ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

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
  - | MachSp
  - | UnwindReturnReg
  - | PicBaseReg
- isArgReg :: GlobalReg -> Bool
- globalRegType :: DynFlags -> GlobalReg -> CmmType
- spReg :: CmmReg
- hpReg :: CmmReg
- spLimReg :: CmmReg
- nodeReg :: CmmReg
- node :: GlobalReg
- baseReg :: CmmReg
- data VGcPtr
  - = VGcPtr
  - | VNonGcPtr
- class Ord r => DefinerOfRegs r a where
- class Ord r => UserOfRegs r a where
- foldRegsDefd :: DefinerOfRegs r a => DynFlags -> (b -> r -> b) -> b -> a -> b
- foldRegsUsed :: UserOfRegs r a => DynFlags -> (b -> r -> b) -> b -> a -> b
- 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 :: 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]
- 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 # |
Methods (==) :: CmmExpr -> CmmExpr -> Bool # (/=) :: CmmExpr -> CmmExpr -> Bool #
(Ord r, UserOfRegs r CmmReg) => UserOfRegs r CmmExpr # |
Methods foldRegsUsed :: DynFlags -> (b -> r -> b) -> b -> CmmExpr -> b #

cmmExprType :: DynFlags -> CmmExpr -> CmmType #

cmmExprWidth :: DynFlags -> CmmExpr -> Width #

maybeInvertCmmExpr :: CmmExpr -> Maybe CmmExpr #

data CmmReg #

Constructors

CmmLocal !LocalReg |
CmmGlobal GlobalReg |

Instances

Eq CmmReg # |
Methods (==) :: CmmReg -> CmmReg -> Bool # (/=) :: CmmReg -> CmmReg -> Bool #
Ord CmmReg # |
Methods compare :: CmmReg -> CmmReg -> Ordering # (<) :: CmmReg -> CmmReg -> Bool # (<=) :: CmmReg -> CmmReg -> Bool # (>) :: CmmReg -> CmmReg -> Bool # (>=) :: CmmReg -> CmmReg -> Bool # max :: CmmReg -> CmmReg -> CmmReg # min :: CmmReg -> CmmReg -> CmmReg #
DefinerOfRegs GlobalReg CmmReg # |
Methods foldRegsDefd :: DynFlags -> (b -> GlobalReg -> b) -> b -> CmmReg -> b #
DefinerOfRegs LocalReg CmmReg # |
Methods foldRegsDefd :: DynFlags -> (b -> LocalReg -> b) -> b -> CmmReg -> b #
UserOfRegs GlobalReg CmmReg # |
Methods foldRegsUsed :: DynFlags -> (b -> GlobalReg -> b) -> b -> CmmReg -> b #
UserOfRegs LocalReg CmmReg # |
Methods foldRegsUsed :: DynFlags -> (b -> LocalReg -> b) -> b -> CmmReg -> b #

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 # |
Methods (==) :: CmmLit -> CmmLit -> Bool # (/=) :: CmmLit -> CmmLit -> Bool #

cmmLitType :: DynFlags -> CmmLit -> CmmType #

data LocalReg #

Constructors

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

Instances

Eq LocalReg # |
Methods (==) :: LocalReg -> LocalReg -> Bool # (/=) :: LocalReg -> LocalReg -> Bool #
Ord LocalReg # |
Methods compare :: LocalReg -> LocalReg -> Ordering # (<) :: LocalReg -> LocalReg -> Bool # (<=) :: LocalReg -> LocalReg -> Bool # (>) :: LocalReg -> LocalReg -> Bool # (>=) :: LocalReg -> LocalReg -> Bool # max :: LocalReg -> LocalReg -> LocalReg # min :: LocalReg -> LocalReg -> LocalReg #
Uniquable LocalReg # |
Methods getUnique :: LocalReg -> Unique #
DefinerOfRegs LocalReg CmmReg # |
Methods foldRegsDefd :: DynFlags -> (b -> LocalReg -> b) -> b -> CmmReg -> b #
UserOfRegs LocalReg CmmReg # |
Methods foldRegsUsed :: DynFlags -> (b -> LocalReg -> b) -> b -> CmmReg -> b #
DefinerOfRegs LocalReg (CmmNode e x) # |
Methods foldRegsDefd :: DynFlags -> (b -> LocalReg -> b) -> b -> CmmNode e x -> b #
UserOfRegs LocalReg (CmmNode e x) # |
Methods foldRegsUsed :: DynFlags -> (b -> LocalReg -> b) -> b -> CmmNode e x -> b #

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 |
MachSp |
UnwindReturnReg |
PicBaseReg |

Instances

Eq GlobalReg # |
Methods (==) :: GlobalReg -> GlobalReg -> Bool # (/=) :: GlobalReg -> GlobalReg -> Bool #
Ord GlobalReg # |
Methods compare :: GlobalReg -> GlobalReg -> Ordering # (<) :: GlobalReg -> GlobalReg -> Bool # (<=) :: GlobalReg -> GlobalReg -> Bool # (>) :: GlobalReg -> GlobalReg -> Bool # (>=) :: GlobalReg -> GlobalReg -> Bool # max :: GlobalReg -> GlobalReg -> GlobalReg # min :: GlobalReg -> GlobalReg -> GlobalReg #
Show GlobalReg # |
Methods showsPrec :: Int -> GlobalReg -> ShowS Source # show :: GlobalReg -> String Source # showList :: [GlobalReg] -> ShowS Source #
DefinerOfRegs GlobalReg CmmReg # |
Methods foldRegsDefd :: DynFlags -> (b -> GlobalReg -> b) -> b -> CmmReg -> b #
UserOfRegs GlobalReg CmmReg # |
Methods foldRegsUsed :: DynFlags -> (b -> GlobalReg -> b) -> b -> CmmReg -> b #
DefinerOfRegs GlobalReg (CmmNode e x) # |
Methods foldRegsDefd :: DynFlags -> (b -> GlobalReg -> b) -> b -> CmmNode e x -> b #
UserOfRegs GlobalReg (CmmNode e x) # |
Methods foldRegsUsed :: DynFlags -> (b -> GlobalReg -> b) -> b -> CmmNode e x -> b #

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 # |
Methods (==) :: VGcPtr -> VGcPtr -> Bool # (/=) :: VGcPtr -> VGcPtr -> Bool #
Show VGcPtr # |
Methods showsPrec :: Int -> VGcPtr -> ShowS Source # show :: VGcPtr -> String Source # showList :: [VGcPtr] -> ShowS Source #

class Ord r => DefinerOfRegs r a where #

Minimal complete definition

foldRegsDefd

Methods

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

Instances

Ord r => DefinerOfRegs r r # |
Methods foldRegsDefd :: DynFlags -> (b -> r -> b) -> b -> r -> b #
DefinerOfRegs GlobalReg CmmReg # |
Methods foldRegsDefd :: DynFlags -> (b -> GlobalReg -> b) -> b -> CmmReg -> b #
DefinerOfRegs LocalReg CmmReg # |
Methods foldRegsDefd :: DynFlags -> (b -> LocalReg -> b) -> b -> CmmReg -> b #
DefinerOfRegs r a => DefinerOfRegs r [a] # |
Methods foldRegsDefd :: DynFlags -> (b -> r -> b) -> b -> [a] -> b #
DefinerOfRegs GlobalReg (CmmNode e x) # |
Methods foldRegsDefd :: DynFlags -> (b -> GlobalReg -> b) -> b -> CmmNode e x -> b #
DefinerOfRegs LocalReg (CmmNode e x) # |
Methods foldRegsDefd :: DynFlags -> (b -> LocalReg -> b) -> b -> CmmNode e x -> b #

class Ord r => UserOfRegs r a where #

Minimal complete definition

foldRegsUsed

Methods

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

Instances

(Ord r, UserOfRegs r CmmReg) => UserOfRegs r CmmExpr # |
Methods foldRegsUsed :: DynFlags -> (b -> r -> b) -> b -> CmmExpr -> b #
Ord r => UserOfRegs r r # |
Methods foldRegsUsed :: DynFlags -> (b -> r -> b) -> b -> r -> b #
(Ord r, UserOfRegs r CmmReg) => UserOfRegs r ForeignTarget # |
Methods foldRegsUsed :: DynFlags -> (b -> r -> b) -> b -> ForeignTarget -> b #
UserOfRegs GlobalReg CmmReg # |
Methods foldRegsUsed :: DynFlags -> (b -> GlobalReg -> b) -> b -> CmmReg -> b #
UserOfRegs LocalReg CmmReg # |
Methods foldRegsUsed :: DynFlags -> (b -> LocalReg -> b) -> b -> CmmReg -> b #
UserOfRegs r a => UserOfRegs r [a] # |
Methods foldRegsUsed :: DynFlags -> (b -> r -> b) -> b -> [a] -> b #
UserOfRegs GlobalReg (CmmNode e x) # |
Methods foldRegsUsed :: DynFlags -> (b -> GlobalReg -> b) -> b -> CmmNode e x -> b #
UserOfRegs LocalReg (CmmNode e x) # |
Methods foldRegsUsed :: DynFlags -> (b -> LocalReg -> b) -> b -> CmmNode e x -> b #

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

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

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 :: 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] #

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 # |
Methods (==) :: Area -> Area -> Bool # (/=) :: Area -> Area -> Bool #
Ord Area # |
Methods compare :: Area -> Area -> Ordering # (<) :: Area -> Area -> Bool # (<=) :: Area -> Area -> Bool # (>) :: Area -> Area -> Bool # (>=) :: Area -> Area -> Bool # max :: Area -> Area -> Area # min :: Area -> Area -> Area #

module CmmMachOp

module CmmType