ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

CmmExpr

Synopsis

- data CmmExpr
  - = CmmLit CmmLit
  - | CmmLoad !CmmExpr !CmmType
  - | CmmReg !CmmReg
  - | CmmMachOp MachOp [CmmExpr]
  - | CmmStackSlot Area !Int
  - | CmmRegOff !CmmReg Int
- cmmExprType :: DynFlags -> CmmExpr -> CmmType
- cmmExprWidth :: DynFlags -> CmmExpr -> Width
- maybeInvertCmmExpr :: CmmExpr -> Maybe CmmExpr
- data CmmReg
  - = CmmLocal !LocalReg
  - | CmmGlobal GlobalReg
- cmmRegType :: DynFlags -> CmmReg -> CmmType
- data CmmLit
  - = CmmInt !Integer Width
  - | CmmFloat Rational Width
  - | CmmVec [CmmLit]
  - | CmmLabel CLabel
  - | CmmLabelOff CLabel Int
  - | CmmLabelDiffOff CLabel CLabel Int
  - | CmmBlock !BlockId
  - | CmmHighStackMark
- cmmLitType :: DynFlags -> CmmLit -> CmmType
- data LocalReg = LocalReg !Unique CmmType
- localRegType :: LocalReg -> CmmType
- data GlobalReg
  - = VanillaReg !Int VGcPtr
  - | FloatReg !Int
  - | DoubleReg !Int
  - | LongReg !Int
  - | XmmReg !Int
  - | YmmReg !Int
  - | ZmmReg !Int
  - | Sp
  - | SpLim
  - | Hp
  - | HpLim
  - | CCCS
  - | CurrentTSO
  - | CurrentNursery
  - | HpAlloc
  - | EagerBlackholeInfo
  - | GCEnter1
  - | GCFun
  - | BaseReg
  - | PicBaseReg
- isArgReg :: GlobalReg -> Bool
- globalRegType :: DynFlags -> GlobalReg -> CmmType
- spReg :: CmmReg
- hpReg :: CmmReg
- spLimReg :: CmmReg
- nodeReg :: CmmReg
- node :: GlobalReg
- baseReg :: CmmReg
- data VGcPtr
  - = VGcPtr
  - | VNonGcPtr
- vgcFlag :: CmmType -> VGcPtr
- class Ord r => DefinerOfRegs r a where
  - foldRegsDefd :: DynFlags -> (b -> r -> b) -> b -> a -> b
- class Ord r => UserOfRegs r a where
  - foldRegsUsed :: DynFlags -> (b -> r -> b) -> b -> a -> b
- filterRegsUsed :: UserOfRegs r e => DynFlags -> (r -> Bool) -> e -> RegSet r
- foldLocalRegsDefd :: DefinerOfRegs LocalReg a => DynFlags -> (b -> LocalReg -> b) -> b -> a -> b
- foldLocalRegsUsed :: UserOfRegs LocalReg a => DynFlags -> (b -> LocalReg -> b) -> b -> a -> b
- type RegSet r = Set r
- type LocalRegSet = RegSet LocalReg
- type GlobalRegSet = RegSet GlobalReg
- emptyRegSet :: Ord r => 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 :: Ord r => RegSet r -> Int
- nullRegSet :: Ord r => RegSet r -> Bool
- regSetToList :: Ord r => RegSet r -> [r]
- regUsedIn :: CmmReg -> CmmExpr -> Bool
- data Area
  - = Old
  - | Young !BlockId
- module CmmMachOp
- module CmmType

# Documentation

data CmmExpr

Constructors

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

Instances

Eq CmmExpr |
Outputable CmmExpr |
UserOfRegs r CmmReg => UserOfRegs r CmmExpr |

cmmExprType :: DynFlags -> CmmExpr -> CmmType

cmmExprWidth :: DynFlags -> CmmExpr -> Width

maybeInvertCmmExpr :: CmmExpr -> Maybe CmmExpr

data CmmReg

Constructors

CmmLocal !LocalReg |
CmmGlobal GlobalReg |

Instances

Eq CmmReg |
Ord CmmReg |
Outputable CmmReg |
DefinerOfRegs GlobalReg CmmReg |
DefinerOfRegs LocalReg CmmReg |
UserOfRegs GlobalReg CmmReg |
UserOfRegs LocalReg CmmReg |

cmmRegType :: DynFlags -> CmmReg -> CmmType

data CmmLit

Constructors

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

Instances

Eq CmmLit |
Outputable CmmLit |

cmmLitType :: DynFlags -> CmmLit -> CmmType

data LocalReg

Constructors

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

Instances

Eq LocalReg |
Ord LocalReg |
Outputable LocalReg |
Uniquable LocalReg |
DefinerOfRegs LocalReg CmmReg |
UserOfRegs LocalReg CmmReg |
DefinerOfRegs LocalReg (CmmNode e x) |
UserOfRegs LocalReg (CmmNode e x) |

localRegType :: LocalReg -> CmmType

data GlobalReg

Constructors

VanillaReg !Int VGcPtr |
FloatReg !Int |
DoubleReg !Int |
LongReg !Int |
XmmReg !Int |
YmmReg !Int |
ZmmReg !Int |
Sp |
SpLim |
Hp |
HpLim |
CCCS |
CurrentTSO |
CurrentNursery |
HpAlloc |
EagerBlackholeInfo |
GCEnter1 |
GCFun |
BaseReg |
PicBaseReg |

Instances

Eq GlobalReg |
Ord GlobalReg |
Show GlobalReg |
Outputable GlobalReg |
DefinerOfRegs GlobalReg CmmReg |
UserOfRegs GlobalReg CmmReg |
DefinerOfRegs GlobalReg (CmmNode e x) |
UserOfRegs GlobalReg (CmmNode e x) |

isArgReg :: GlobalReg -> Bool

globalRegType :: DynFlags -> GlobalReg -> CmmType

spReg :: CmmReg

hpReg :: CmmReg

spLimReg :: CmmReg

nodeReg :: CmmReg

node :: GlobalReg

baseReg :: CmmReg

data VGcPtr

Constructors

VGcPtr |
VNonGcPtr |

Instances

Eq VGcPtr |
Show VGcPtr |

vgcFlag :: CmmType -> VGcPtr

class Ord r => DefinerOfRegs r a where

Methods

foldRegsDefd :: DynFlags -> (b -> r -> b) -> b -> a -> b

Instances

Ord r => DefinerOfRegs r r |
DefinerOfRegs GlobalReg CmmReg |
DefinerOfRegs LocalReg CmmReg |
DefinerOfRegs r a => DefinerOfRegs r (Maybe a) |
DefinerOfRegs r a => DefinerOfRegs r [a] |
DefinerOfRegs GlobalReg (CmmNode e x) |
DefinerOfRegs LocalReg (CmmNode e x) |

class Ord r => UserOfRegs r a where

Methods

foldRegsUsed :: DynFlags -> (b -> r -> b) -> b -> a -> b

Instances

UserOfRegs r CmmReg => UserOfRegs r CmmExpr |
Ord r => UserOfRegs r r |
UserOfRegs r CmmExpr => UserOfRegs r ForeignTarget |
UserOfRegs GlobalReg CmmReg |
UserOfRegs LocalReg CmmReg |
UserOfRegs r a => UserOfRegs r [a] |
UserOfRegs r a => UserOfRegs r (Maybe a) |
Ord r => UserOfRegs r (RegSet r) |
UserOfRegs GlobalReg (CmmNode e x) |
UserOfRegs LocalReg (CmmNode e x) |

filterRegsUsed :: UserOfRegs r e => DynFlags -> (r -> Bool) -> e -> RegSet r

foldLocalRegsDefd :: DefinerOfRegs LocalReg a => DynFlags -> (b -> LocalReg -> b) -> b -> a -> b

foldLocalRegsUsed :: UserOfRegs LocalReg a => DynFlags -> (b -> LocalReg -> b) -> b -> a -> b

type RegSet r = Set r

Sets of registers

type LocalRegSet = RegSet LocalReg

type GlobalRegSet = RegSet GlobalReg

emptyRegSet :: Ord r => 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 :: Ord r => RegSet r -> Int

nullRegSet :: Ord r => RegSet r -> Bool

regSetToList :: Ord r => RegSet r -> [r]

regUsedIn :: CmmReg -> CmmExpr -> Bool

data Area

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

Eq Area |
Ord Area |
Outputable Area |

module CmmMachOp

module CmmType