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

Safe Haskell | Ignore
Language | GHC2021

GHC.Cmm.Expr

Synopsis

- data CmmExpr
  - = CmmLit !CmmLit
  - | CmmLoad !CmmExpr !CmmType !AlignmentSpec
  - | CmmReg !CmmReg
  - | CmmMachOp MachOp [CmmExpr]
  - | CmmStackSlot Area !Int
  - | CmmRegOff !CmmReg !Int
- cmmExprType :: Platform -> CmmExpr -> CmmType
- cmmExprWidth :: Platform -> CmmExpr -> Width
- cmmExprAlignment :: CmmExpr -> Alignment
- maybeInvertCmmExpr :: CmmExpr -> Maybe CmmExpr
- data CmmReg
  - = CmmLocal !LocalReg
  - | CmmGlobal GlobalRegUse
- cmmRegType :: CmmReg -> CmmType
- cmmRegWidth :: CmmReg -> Width
- data CmmLit
  - = CmmInt !Integer !Width
  - | CmmFloat Rational !Width
  - | CmmVec [CmmLit]
  - | CmmLabel CLabel
  - | CmmLabelOff CLabel !Int
  - | CmmLabelDiffOff CLabel CLabel !Int !Width
  - | CmmBlock !BlockId
  - | CmmHighStackMark
- cmmLitType :: Platform -> CmmLit -> CmmType
- data AlignmentSpec
  - = NaturallyAligned
  - | Unaligned
- data LocalReg = LocalReg !Unique !CmmType
- localRegType :: LocalReg -> CmmType
- data GlobalReg
  - = VanillaReg !Int
  - | FloatReg !Int
  - | DoubleReg !Int
  - | LongReg !Int
  - | XmmReg !Int
  - | YmmReg !Int
  - | ZmmReg !Int
  - | Sp
  - | SpLim
  - | Hp
  - | HpLim
  - | CCCS
  - | CurrentTSO
  - | CurrentNursery
  - | HpAlloc
  - | EagerBlackholeInfo
  - | GCEnter1
  - | GCFun
  - | BaseReg
  - | MachSp
  - | UnwindReturnReg
  - | PicBaseReg
- isArgReg :: GlobalReg -> Bool
- globalRegSpillType :: Platform -> GlobalReg -> CmmType
- data GlobalRegUse = GlobalRegUse {
  - globalRegUse_reg :: !GlobalReg
  - globalRegUse_type :: !CmmType
  }
- spReg :: Platform -> CmmReg
- hpReg :: Platform -> CmmReg
- spLimReg :: Platform -> CmmReg
- hpLimReg :: Platform -> CmmReg
- nodeReg :: Platform -> CmmReg
- currentTSOReg :: Platform -> CmmReg
- currentNurseryReg :: Platform -> CmmReg
- hpAllocReg :: Platform -> CmmReg
- cccsReg :: Platform -> CmmReg
- node :: GlobalReg
- baseReg :: Platform -> CmmReg
- class Ord r => DefinerOfRegs r a
- class Ord r => UserOfRegs r a
- foldRegsDefd :: DefinerOfRegs r a => Platform -> (b -> r -> b) -> b -> a -> b
- foldRegsUsed :: UserOfRegs r a => Platform -> (b -> r -> b) -> b -> a -> b
- foldLocalRegsDefd :: DefinerOfRegs LocalReg a => Platform -> (b -> LocalReg -> b) -> b -> a -> b
- foldLocalRegsUsed :: UserOfRegs LocalReg a => Platform -> (b -> LocalReg -> b) -> b -> a -> b
- type RegSet r = Set r
- type LocalRegSet = RegSet LocalReg
- type GlobalRegSet = RegSet GlobalReg
- emptyRegSet :: RegSet r
- elemRegSet :: Ord r => r -> RegSet r -> Bool
- extendRegSet :: Ord r => RegSet r -> r -> RegSet r
- deleteFromRegSet :: Ord r => RegSet r -> r -> RegSet r
- mkRegSet :: Ord r => [r] -> RegSet r
- plusRegSet :: Ord r => RegSet r -> RegSet r -> RegSet r
- minusRegSet :: Ord r => RegSet r -> RegSet r -> RegSet r
- timesRegSet :: Ord r => RegSet r -> RegSet r -> RegSet r
- sizeRegSet :: RegSet r -> Int
- nullRegSet :: RegSet r -> Bool
- regSetToList :: RegSet r -> [r]
- isTrivialCmmExpr :: CmmExpr -> Bool
- hasNoGlobalRegs :: CmmExpr -> Bool
- isLit :: CmmExpr -> Bool
- isComparisonExpr :: CmmExpr -> Bool
- data Area
  - = Old
  - | Young !BlockId
- module GHC.Cmm.MachOp
- module GHC.Cmm.Type

# Documentation

data CmmExpr Source #

Constructors

CmmLit !CmmLit |
CmmLoad !CmmExpr !CmmType !AlignmentSpec |
CmmReg !CmmReg |
CmmMachOp MachOp [CmmExpr] |
CmmStackSlot Area !Int |
CmmRegOff !CmmReg !Int |

#### Instances

Instances details

Show CmmExpr Source # |
Instance details Defined in GHC.Cmm.Expr Methods showsPrec :: Int -> CmmExpr -> ShowS Source # show :: CmmExpr -> String Source # showList :: [CmmExpr] -> ShowS Source #
Eq CmmExpr Source # |
Instance details Defined in GHC.Cmm.Expr Methods (==) :: CmmExpr -> CmmExpr -> Bool Source # (/=) :: CmmExpr -> CmmExpr -> Bool Source #
(Ord r, UserOfRegs r CmmReg) => UserOfRegs r CmmExpr Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> r -> b) -> b -> CmmExpr -> b Source #
OutputableP Platform CmmExpr Source # |
Instance details Defined in GHC.Cmm.Expr Methods pdoc :: Platform -> CmmExpr -> SDoc Source #

cmmExprType :: Platform -> CmmExpr -> CmmType Source #

cmmExprWidth :: Platform -> CmmExpr -> Width Source #

cmmExprAlignment :: CmmExpr -> Alignment Source #

Returns an alignment in bytes of a CmmExpr when it's a statically known integer constant, otherwise returns an alignment of 1 byte. The caller is responsible for using with a sensible CmmExpr argument.

maybeInvertCmmExpr :: CmmExpr -> Maybe CmmExpr Source #

data CmmReg Source #

Constructors

CmmLocal !LocalReg |
CmmGlobal GlobalRegUse |

#### Instances

Instances details

Show CmmReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods showsPrec :: Int -> CmmReg -> ShowS Source # show :: CmmReg -> String Source # showList :: [CmmReg] -> ShowS Source #
Outputable CmmReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods ppr :: CmmReg -> SDoc Source #
Eq CmmReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods (==) :: CmmReg -> CmmReg -> Bool Source # (/=) :: CmmReg -> CmmReg -> Bool Source #
Ord CmmReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods compare :: CmmReg -> CmmReg -> Ordering Source # (<) :: CmmReg -> CmmReg -> Bool Source # (<=) :: CmmReg -> CmmReg -> Bool Source # (>) :: CmmReg -> CmmReg -> Bool Source # (>=) :: CmmReg -> CmmReg -> Bool Source # max :: CmmReg -> CmmReg -> CmmReg Source # min :: CmmReg -> CmmReg -> CmmReg Source #
DefinerOfRegs GlobalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> GlobalReg -> b) -> b -> CmmReg -> b Source #
DefinerOfRegs GlobalRegUse CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> GlobalRegUse -> b) -> b -> CmmReg -> b Source #
DefinerOfRegs LocalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> LocalReg -> b) -> b -> CmmReg -> b Source #
UserOfRegs GlobalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> GlobalReg -> b) -> b -> CmmReg -> b Source #
UserOfRegs GlobalRegUse CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> GlobalRegUse -> b) -> b -> CmmReg -> b Source #
UserOfRegs LocalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> LocalReg -> b) -> b -> CmmReg -> b Source #

cmmRegType :: CmmReg -> CmmType Source #

cmmRegWidth :: CmmReg -> Width Source #

data CmmLit Source #

Constructors

CmmInt !Integer !Width |
CmmFloat Rational !Width |
CmmVec [CmmLit] |
CmmLabel CLabel |
CmmLabelOff CLabel !Int |
CmmLabelDiffOff CLabel CLabel !Int !Width |
CmmBlock !BlockId |
CmmHighStackMark |

#### Instances

Instances details

Show CmmLit Source # |
Instance details Defined in GHC.Cmm.Expr Methods showsPrec :: Int -> CmmLit -> ShowS Source # show :: CmmLit -> String Source # showList :: [CmmLit] -> ShowS Source #
Outputable CmmLit Source # |
Instance details Defined in GHC.Cmm.Expr Methods ppr :: CmmLit -> SDoc Source #
Eq CmmLit Source # |
Instance details Defined in GHC.Cmm.Expr Methods (==) :: CmmLit -> CmmLit -> Bool Source # (/=) :: CmmLit -> CmmLit -> Bool Source #
OutputableP Platform CmmLit Source # |
Instance details Defined in GHC.Cmm.Expr Methods pdoc :: Platform -> CmmLit -> SDoc Source #

cmmLitType :: Platform -> CmmLit -> CmmType Source #

data AlignmentSpec Source #

Constructors

NaturallyAligned |
Unaligned |

#### Instances

Instances details

Show AlignmentSpec Source # |
Instance details Defined in GHC.Cmm.Expr Methods showsPrec :: Int -> AlignmentSpec -> ShowS Source # show :: AlignmentSpec -> String Source # showList :: [AlignmentSpec] -> ShowS Source #
Eq AlignmentSpec Source # |
Instance details Defined in GHC.Cmm.Expr Methods (==) :: AlignmentSpec -> AlignmentSpec -> Bool Source # (/=) :: AlignmentSpec -> AlignmentSpec -> Bool Source #
Ord AlignmentSpec Source # |

Instance details

Defined in GHC.Cmm.Expr

Methods

compare :: AlignmentSpec -> AlignmentSpec -> Ordering Source #

(<) :: AlignmentSpec -> AlignmentSpec -> Bool Source #

(<=) :: AlignmentSpec -> AlignmentSpec -> Bool Source #

(>) :: AlignmentSpec -> AlignmentSpec -> Bool Source #

(>=) :: AlignmentSpec -> AlignmentSpec -> Bool Source #

max :: AlignmentSpec -> AlignmentSpec -> AlignmentSpec Source #

min :: AlignmentSpec -> AlignmentSpec -> AlignmentSpec Source #

data LocalReg Source #

Constructors

LocalReg !Unique !CmmType | Parameters: 1. Identifier 2. Type

#### Instances

Instances details

Show LocalReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods showsPrec :: Int -> LocalReg -> ShowS Source # show :: LocalReg -> String Source # showList :: [LocalReg] -> ShowS Source #
Uniquable LocalReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods getUnique :: LocalReg -> Unique Source #
Outputable LocalReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods ppr :: LocalReg -> SDoc Source #
Eq LocalReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods (==) :: LocalReg -> LocalReg -> Bool Source # (/=) :: LocalReg -> LocalReg -> Bool Source #
Ord LocalReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods compare :: LocalReg -> LocalReg -> Ordering Source # (<) :: LocalReg -> LocalReg -> Bool Source # (<=) :: LocalReg -> LocalReg -> Bool Source # (>) :: LocalReg -> LocalReg -> Bool Source # (>=) :: LocalReg -> LocalReg -> Bool Source # max :: LocalReg -> LocalReg -> LocalReg Source # min :: LocalReg -> LocalReg -> LocalReg Source #
DefinerOfRegs LocalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> LocalReg -> b) -> b -> CmmReg -> b Source #
UserOfRegs LocalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> LocalReg -> b) -> b -> CmmReg -> b Source #
DefinerOfRegs LocalReg (CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods foldRegsDefd :: Platform -> (b -> LocalReg -> b) -> b -> CmmNode e x -> b Source #
UserOfRegs LocalReg (CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods foldRegsUsed :: Platform -> (b -> LocalReg -> b) -> b -> CmmNode e x -> b Source #

localRegType :: LocalReg -> CmmType Source #

data GlobalReg Source #

An abstract global register for the STG machine.

See also `GlobalRegUse`, which denotes a usage of a register at a particular type (e.g. using a 32-bit wide register to store an 8-bit wide value), as per Note [GlobalReg vs GlobalRegUse].

Constructors

VanillaReg !Int |
FloatReg !Int |
DoubleReg !Int |
LongReg !Int |
XmmReg !Int |
YmmReg !Int |
ZmmReg !Int |
Sp | Stack ptr; points to last occupied stack location.
SpLim | Stack limit
Hp | Heap ptr; points to last occupied heap location.
HpLim | Heap limit register
CCCS | Current cost-centre stack
CurrentTSO | pointer to current thread's TSO
CurrentNursery | pointer to allocation area
HpAlloc | allocation count for heap check failure
EagerBlackholeInfo | address of stg_EAGER_BLACKHOLE_info
GCEnter1 | address of stg_gc_enter_1
GCFun | address of stg_gc_fun
BaseReg | Base offset for the register table, used for accessing registers which do not have real registers assigned to them. This register will only appear after we have expanded GlobalReg into memory accesses (where necessary) in the native code generator.
MachSp | The register used by the platform for the C stack pointer. This is a break in the STG abstraction used exclusively to setup stack unwinding information.
UnwindReturnReg | A dummy register used to indicate to the stack unwinder where a routine would return to.
PicBaseReg | Base Register for PIC (position-independent code) calculations. Only used inside the native code generator. Its exact meaning differs from platform to platform (see module PositionIndependentCode).

#### Instances

Instances details

Show GlobalReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods showsPrec :: Int -> GlobalReg -> ShowS Source # show :: GlobalReg -> String Source # showList :: [GlobalReg] -> ShowS Source #
Outputable GlobalReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods ppr :: GlobalReg -> SDoc Source #
Eq GlobalReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods (==) :: GlobalReg -> GlobalReg -> Bool Source # (/=) :: GlobalReg -> GlobalReg -> Bool Source #
Ord GlobalReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods compare :: GlobalReg -> GlobalReg -> Ordering Source # (<) :: GlobalReg -> GlobalReg -> Bool Source # (<=) :: GlobalReg -> GlobalReg -> Bool Source # (>) :: GlobalReg -> GlobalReg -> Bool Source # (>=) :: GlobalReg -> GlobalReg -> Bool Source # max :: GlobalReg -> GlobalReg -> GlobalReg Source # min :: GlobalReg -> GlobalReg -> GlobalReg Source #
DefinerOfRegs GlobalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> GlobalReg -> b) -> b -> CmmReg -> b Source #
UserOfRegs GlobalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> GlobalReg -> b) -> b -> CmmReg -> b Source #
OutputableP env GlobalReg Source # |
Instance details Defined in GHC.Cmm.Reg Methods pdoc :: env -> GlobalReg -> SDoc Source #

isArgReg :: GlobalReg -> Bool Source #

globalRegSpillType :: Platform -> GlobalReg -> CmmType Source #

data GlobalRegUse Source #

A use of a global register at a particular type.

While a `GlobalReg` identifies a global register in the STG machine, a `GlobalRegUse` also contains information about the type we are storing in the register.

See Note [GlobalReg vs GlobalRegUse] for more information.

Constructors

GlobalRegUse |

Fields

- globalRegUse_reg :: !GlobalReg

  The underlying `GlobalReg`

- globalRegUse_type :: !CmmType

  The `CmmType` at which we are using the `GlobalReg`.

  Its width must be less than the width of the `GlobalReg`:

      typeWidth ty <= typeWidth (globalRegSpillType platform reg)

#### Instances

Instances details

Show GlobalRegUse Source # |
Instance details Defined in GHC.Cmm.Reg Methods showsPrec :: Int -> GlobalRegUse -> ShowS Source # show :: GlobalRegUse -> String Source # showList :: [GlobalRegUse] -> ShowS Source #
Outputable GlobalRegUse Source # |
Instance details Defined in GHC.Cmm.Reg Methods ppr :: GlobalRegUse -> SDoc Source #
Eq GlobalRegUse Source # |
Instance details Defined in GHC.Cmm.Reg Methods (==) :: GlobalRegUse -> GlobalRegUse -> Bool Source # (/=) :: GlobalRegUse -> GlobalRegUse -> Bool Source #
Ord GlobalRegUse Source # |

Instance details

Defined in GHC.Cmm.Reg

Methods

compare :: GlobalRegUse -> GlobalRegUse -> Ordering Source #

(<) :: GlobalRegUse -> GlobalRegUse -> Bool Source #

(<=) :: GlobalRegUse -> GlobalRegUse -> Bool Source #

(>) :: GlobalRegUse -> GlobalRegUse -> Bool Source #

(>=) :: GlobalRegUse -> GlobalRegUse -> Bool Source #

max :: GlobalRegUse -> GlobalRegUse -> GlobalRegUse Source #

min :: GlobalRegUse -> GlobalRegUse -> GlobalRegUse Source #

DefinerOfRegs GlobalRegUse CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> GlobalRegUse -> b) -> b -> CmmReg -> b Source #
UserOfRegs GlobalRegUse CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> GlobalRegUse -> b) -> b -> CmmReg -> b Source #
DefinerOfRegs GlobalRegUse (CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods foldRegsDefd :: Platform -> (b -> GlobalRegUse -> b) -> b -> CmmNode e x -> b Source #
UserOfRegs GlobalRegUse (CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods foldRegsUsed :: Platform -> (b -> GlobalRegUse -> b) -> b -> CmmNode e x -> b Source #

spReg :: Platform -> CmmReg Source #

hpReg :: Platform -> CmmReg Source #

spLimReg :: Platform -> CmmReg Source #

hpLimReg :: Platform -> CmmReg Source #

nodeReg :: Platform -> CmmReg Source #

currentTSOReg :: Platform -> CmmReg Source #

currentNurseryReg :: Platform -> CmmReg Source #

hpAllocReg :: Platform -> CmmReg Source #

cccsReg :: Platform -> CmmReg Source #

node :: GlobalReg Source #

baseReg :: Platform -> CmmReg Source #

class Ord r => DefinerOfRegs r a Source #

Minimal complete definition

foldRegsDefd

#### Instances

Instances details

DefinerOfRegs GlobalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> GlobalReg -> b) -> b -> CmmReg -> b Source #
DefinerOfRegs GlobalRegUse CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> GlobalRegUse -> b) -> b -> CmmReg -> b Source #
DefinerOfRegs LocalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> LocalReg -> b) -> b -> CmmReg -> b Source #
Ord r => DefinerOfRegs r r Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> r -> b) -> b -> r -> b Source #
DefinerOfRegs r a => DefinerOfRegs r [a] Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsDefd :: Platform -> (b -> r -> b) -> b -> [a] -> b Source #
DefinerOfRegs GlobalRegUse (CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods foldRegsDefd :: Platform -> (b -> GlobalRegUse -> b) -> b -> CmmNode e x -> b Source #
DefinerOfRegs LocalReg (CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods foldRegsDefd :: Platform -> (b -> LocalReg -> b) -> b -> CmmNode e x -> b Source #

class Ord r => UserOfRegs r a Source #

Minimal complete definition

foldRegsUsed

#### Instances

Instances details

UserOfRegs GlobalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> GlobalReg -> b) -> b -> CmmReg -> b Source #
UserOfRegs GlobalRegUse CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> GlobalRegUse -> b) -> b -> CmmReg -> b Source #
UserOfRegs LocalReg CmmReg Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> LocalReg -> b) -> b -> CmmReg -> b Source #
(Ord r, UserOfRegs r CmmReg) => UserOfRegs r CmmExpr Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> r -> b) -> b -> CmmExpr -> b Source #
(Ord r, UserOfRegs r CmmReg) => UserOfRegs r ForeignTarget Source # |
Instance details Defined in GHC.Cmm.Node Methods foldRegsUsed :: Platform -> (b -> r -> b) -> b -> ForeignTarget -> b Source #
Ord r => UserOfRegs r r Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> r -> b) -> b -> r -> b Source #
UserOfRegs r a => UserOfRegs r [a] Source # |
Instance details Defined in GHC.Cmm.Expr Methods foldRegsUsed :: Platform -> (b -> r -> b) -> b -> [a] -> b Source #
UserOfRegs GlobalRegUse (CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods foldRegsUsed :: Platform -> (b -> GlobalRegUse -> b) -> b -> CmmNode e x -> b Source #
UserOfRegs LocalReg (CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods foldRegsUsed :: Platform -> (b -> LocalReg -> b) -> b -> CmmNode e x -> b Source #

foldRegsDefd :: DefinerOfRegs r a => Platform -> (b -> r -> b) -> b -> a -> b Source #

foldRegsUsed :: UserOfRegs r a => Platform -> (b -> r -> b) -> b -> a -> b Source #

foldLocalRegsDefd :: DefinerOfRegs LocalReg a => Platform -> (b -> LocalReg -> b) -> b -> a -> b Source #

foldLocalRegsUsed :: UserOfRegs LocalReg a => Platform -> (b -> LocalReg -> b) -> b -> a -> b Source #

type RegSet r = Set r Source #

Sets of registers

type LocalRegSet = RegSet LocalReg Source #

type GlobalRegSet = RegSet GlobalReg Source #

emptyRegSet :: RegSet r Source #

elemRegSet :: Ord r => r -> RegSet r -> Bool Source #

extendRegSet :: Ord r => RegSet r -> r -> RegSet r Source #

deleteFromRegSet :: Ord r => RegSet r -> r -> RegSet r Source #

mkRegSet :: Ord r => [r] -> RegSet r Source #

plusRegSet :: Ord r => RegSet r -> RegSet r -> RegSet r Source #

minusRegSet :: Ord r => RegSet r -> RegSet r -> RegSet r Source #

timesRegSet :: Ord r => RegSet r -> RegSet r -> RegSet r Source #

sizeRegSet :: RegSet r -> Int Source #

nullRegSet :: RegSet r -> Bool Source #

regSetToList :: RegSet r -> [r] Source #

isTrivialCmmExpr :: CmmExpr -> Bool Source #

hasNoGlobalRegs :: CmmExpr -> Bool Source #

isLit :: CmmExpr -> Bool Source #

isComparisonExpr :: CmmExpr -> Bool Source #

data Area Source #

A stack area is either the stack slot where a variable is spilled or the stack space where function arguments and results are passed.

Constructors

Old |
Young !BlockId |

#### Instances

Instances details

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

module GHC.Cmm.MachOp

module GHC.Cmm.Type