ghc-lib-parser-9.10.1.20250103: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Cmm.Type

Synopsis

- data CmmType
- b8 :: CmmType
- b16 :: CmmType
- b32 :: CmmType
- b64 :: CmmType
- b128 :: CmmType
- b256 :: CmmType
- b512 :: CmmType
- f32 :: CmmType
- f64 :: CmmType
- bWord :: Platform -> CmmType
- bHalfWord :: Platform -> CmmType
- gcWord :: Platform -> CmmType
- cInt :: Platform -> CmmType
- cmmBits :: Width -> CmmType
- cmmFloat :: Width -> CmmType
- typeWidth :: CmmType -> Width
- setCmmTypeWidth :: Width -> CmmType -> CmmType
- cmmEqType :: CmmType -> CmmType -> Bool
- cmmEqType_ignoring_ptrhood :: CmmType -> CmmType -> Bool
- isFloatType :: CmmType -> Bool
- isGcPtrType :: CmmType -> Bool
- isBitsType :: CmmType -> Bool
- isWordAny :: CmmType -> Bool
- isWord32 :: CmmType -> Bool
- isWord64 :: CmmType -> Bool
- isFloat64 :: CmmType -> Bool
- isFloat32 :: CmmType -> Bool
- data Width
  - = W8
  - | W16
  - | W32
  - | W64
  - | W128
  - | W256
  - | W512
- widthInBits :: Width -> Int
- widthInBytes :: Width -> Int
- widthInLog :: Width -> Int
- widthFromBytes :: Int -> Width
- wordWidth :: Platform -> Width
- halfWordWidth :: Platform -> Width
- cIntWidth :: Platform -> Width
- halfWordMask :: Platform -> Integer
- narrowU :: Width -> Integer -> Integer
- narrowS :: Width -> Integer -> Integer
- rEP_CostCentreStack_mem_alloc :: Platform -> CmmType
- rEP_CostCentreStack_scc_count :: Platform -> CmmType
- rEP_StgEntCounter_allocs :: Platform -> CmmType
- rEP_StgEntCounter_allocd :: Platform -> CmmType
- data ForeignHint
  - = NoHint
  - | AddrHint
  - | SignedHint
- type Length = Int
- vec :: Length -> CmmType -> CmmType
- vec2 :: CmmType -> CmmType
- vec4 :: CmmType -> CmmType
- vec8 :: CmmType -> CmmType
- vec16 :: CmmType -> CmmType
- vec2f64 :: CmmType
- vec2b64 :: CmmType
- vec4f32 :: CmmType
- vec4b32 :: CmmType
- vec8b16 :: CmmType
- vec16b8 :: CmmType
- cmmVec :: Int -> CmmType -> CmmType
- vecLength :: CmmType -> Length
- vecElemType :: CmmType -> CmmType
- isVecType :: CmmType -> Bool
- type DoAlignSanitisation = Bool

# Documentation

data CmmType #

#### Instances

Instances details

Show CmmType # |
Instance details Defined in GHC.Cmm.Type Methods showsPrec :: Int -> CmmType -> ShowS # show :: CmmType -> String # showList :: [CmmType] -> ShowS #
Outputable CmmType # |
Instance details Defined in GHC.Cmm.Type Methods ppr :: CmmType -> SDoc #

b8 :: CmmType #

b16 :: CmmType #

b32 :: CmmType #

b64 :: CmmType #

b128 :: CmmType #

b256 :: CmmType #

b512 :: CmmType #

f32 :: CmmType #

f64 :: CmmType #

bWord :: Platform -> CmmType #

bHalfWord :: Platform -> CmmType #

gcWord :: Platform -> CmmType #

cInt :: Platform -> CmmType #

cmmBits :: Width -> CmmType #

cmmFloat :: Width -> CmmType #

typeWidth :: CmmType -> Width #

setCmmTypeWidth :: Width -> CmmType -> CmmType #

cmmEqType :: CmmType -> CmmType -> Bool #

cmmEqType_ignoring_ptrhood :: CmmType -> CmmType -> Bool #

isFloatType :: CmmType -> Bool #

isGcPtrType :: CmmType -> Bool #

isBitsType :: CmmType -> Bool #

isWordAny :: CmmType -> Bool #

isWord32 :: CmmType -> Bool #

isWord64 :: CmmType -> Bool #

isFloat64 :: CmmType -> Bool #

isFloat32 :: CmmType -> Bool #

data Width #

Constructors

W8 |
W16 |
W32 |
W64 |
W128 |
W256 |
W512 |

#### Instances

Instances details

Show Width # |
Instance details Defined in GHC.Cmm.Type Methods showsPrec :: Int -> Width -> ShowS # show :: Width -> String # showList :: [Width] -> ShowS #
Outputable Width # |
Instance details Defined in GHC.Cmm.Type Methods ppr :: Width -> SDoc #
Eq Width # |
Instance details Defined in GHC.Cmm.Type Methods (==) :: Width -> Width -> Bool # (/=) :: Width -> Width -> Bool #
Ord Width # |
Instance details Defined in GHC.Cmm.Type Methods compare :: Width -> Width -> Ordering # (<) :: Width -> Width -> Bool # (<=) :: Width -> Width -> Bool # (>) :: Width -> Width -> Bool # (>=) :: Width -> Width -> Bool # max :: Width -> Width -> Width # min :: Width -> Width -> Width #

widthInBits :: Width -> Int #

A width in bits.

widthInBytes :: Width -> Int #

A width in bytes.

    widthFromBytes (widthInBytes w) === w

widthInLog :: Width -> Int #

log_2 of the width in bytes, useful for generating shifts.

widthFromBytes :: Int -> Width #

- Partial* A width from the number of bytes.

wordWidth :: Platform -> Width #

The width of the current platform's word size.

halfWordWidth :: Platform -> Width #

The width of the current platform's half-word size.

cIntWidth :: Platform -> Width #

halfWordMask :: Platform -> Integer #

A bit-mask for the lower half-word of current platform.

narrowU :: Width -> Integer -> Integer #

Narrow a signed or unsigned value to the given width. The result will reside in `[0, +2^width)`.

    >>> narrowU W8 256    == 256
    >>> narrowU W8 255    == 255
    >>> narrowU W8 128    == 128
    >>> narrowU W8 127    == 127
    >>> narrowU W8 0      == 0
    >>> narrowU W8 (-127) == 129
    >>> narrowU W8 (-128) == 128
    >>> narrowU W8 (-129) == 127
    >>> narrowU W8 (-255) == 1
    >>> narrowU W8 (-256) == 0

narrowS :: Width -> Integer -> Integer #

Narrow a signed value to the given width. The result will reside in `[-2^(width-1), +2^(width-1))`.

    >>> narrowS W8 256    == 0
    >>> narrowS W8 255    == -1
    >>> narrowS W8 128    == -128
    >>> narrowS W8 127    == 127
    >>> narrowS W8 0      == 0
    >>> narrowS W8 (-127) == -127
    >>> narrowS W8 (-128) == -128
    >>> narrowS W8 (-129) == 127
    >>> narrowS W8 (-255) == 1
    >>> narrowS W8 (-256) == 0

rEP_CostCentreStack_mem_alloc :: Platform -> CmmType #

rEP_CostCentreStack_scc_count :: Platform -> CmmType #

rEP_StgEntCounter_allocs :: Platform -> CmmType #

rEP_StgEntCounter_allocd :: Platform -> CmmType #

data ForeignHint #

Constructors

NoHint |
AddrHint |
SignedHint |

#### Instances

Instances details

Outputable ForeignHint # |
Instance details Defined in GHC.Cmm.Type Methods ppr :: ForeignHint -> SDoc #
Eq ForeignHint # |
Instance details Defined in GHC.Cmm.Type Methods (==) :: ForeignHint -> ForeignHint -> Bool # (/=) :: ForeignHint -> ForeignHint -> Bool #

type Length = Int #

vec :: Length -> CmmType -> CmmType #

vec2 :: CmmType -> CmmType #

vec4 :: CmmType -> CmmType #

vec8 :: CmmType -> CmmType #

vec16 :: CmmType -> CmmType #

vec2f64 :: CmmType #

vec2b64 :: CmmType #

vec4f32 :: CmmType #

vec4b32 :: CmmType #

vec8b16 :: CmmType #

vec16b8 :: CmmType #

cmmVec :: Int -> CmmType -> CmmType #

vecLength :: CmmType -> Length #

vecElemType :: CmmType -> CmmType #

isVecType :: CmmType -> Bool #

type DoAlignSanitisation = Bool #

is `-falignment-sanitisation` enabled?