[GHC] #15682: evolve / improve Native Gen Format in Format.hs (especially in context of post simd cleanup)

GHC ghc-devs at haskell.org
Thu Sep 27 21:12:37 UTC 2018


#15682: evolve / improve Native Gen Format in Format.hs (especially in context of
post simd cleanup)
-------------------------------------+-------------------------------------
           Reporter:  carter         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.6.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 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

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15682>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list