Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,842
    • Issues 4,842
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #15682

Closed
Open
Created Sep 27, 2018 by Carter Schonwald@carterDeveloper

evolve / improve Native Gen Format in Format.hs (especially in context of post simd cleanup)

Currently GlobalReg represents the STG machine registers. However, some STG registers get aliased to the same machine registers (e.g. FloatReg 1 and DoubleReg 1; see Note [Overlapping global registers]). To make matters worse, we assume that we can always determine the CmmType of a GlobalReg. However, in the case of SIMD registers this isn't necessarily the case (e.g. a XMM register may contain 1 or 2 double-precision floats, or 1, 2, 4, 8, or 16 integers).

for ghc/compiler/nativeGen/Format.hs

data Format
        = II8
        | II16
        | II32
        | II64
        | FF32
        | FF64
        | FF80
        deriving (Show, Eq)

currently this is meant to "encode" both physical bit size AND which register class the value is. we also have the issue that this register class distinction stops being true once simd integer operations.

this gets worse with simd once we want to track (perhaps?) the size / number of elements used in the xmm/ymm/zmm / arm simd vectors.

perhaps also: signedness?

this actually also relates to how GlobalRegisters and Format are related! is GlobalRegisters meant for STG machine vs native Machine?

this intersects with ABI questions. Plus we currently have eg Float and Double which are different logically/semantically, BUT the same registers in most native machine architectures

Trac metadata
Trac field Value
Version 8.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking