ghc-7.0.4: The GHC API

CmmUtils

Synopsis

- type CmmStmts = OrdList CmmStmt
- noStmts :: CmmStmts
- oneStmt :: CmmStmt -> CmmStmts
- mkStmts :: [CmmStmt] -> CmmStmts
- plusStmts :: CmmStmts -> CmmStmts -> CmmStmts
- stmtList :: CmmStmts -> [CmmStmt]
- isNopStmt :: CmmStmt -> Bool
- primRepCmmType :: PrimRep -> CmmType
- primRepForeignHint :: PrimRep -> ForeignHint
- typeCmmType :: Type -> CmmType
- typeForeignHint :: Type -> ForeignHint
- isTrivialCmmExpr :: CmmExpr -> Bool
- hasNoGlobalRegs :: CmmExpr -> Bool
- cmmRegOff :: CmmReg -> Int -> CmmExpr
- cmmLabelOff :: CLabel -> Int -> CmmLit
- cmmOffset :: CmmExpr -> Int -> CmmExpr
- cmmOffsetLit :: CmmLit -> Int -> CmmLit
- cmmIndex :: Width -> CmmExpr -> Int -> CmmExpr
- cmmOffsetExpr :: CmmExpr -> CmmExpr -> CmmExpr
- cmmIndexExpr :: Width -> CmmExpr -> CmmExpr -> CmmExpr
- cmmLoadIndex :: CmmType -> CmmExpr -> Int -> CmmExpr
- mkIntCLit :: Int -> CmmLit
- zeroCLit :: CmmLit
- mkLblExpr :: CLabel -> CmmExpr
- maybeAssignTemp :: [Unique] -> CmmExpr -> ([Unique], [CmmStmt], CmmExpr)
- loadArgsIntoTemps :: [Unique] -> HintedCmmActuals -> ([Unique], [CmmStmt], HintedCmmActuals)

# Documentation

type CmmStmts = OrdList CmmStmt Source

noStmts :: CmmStmts Source

oneStmt :: CmmStmt -> CmmStmts Source

mkStmts :: [CmmStmt] -> CmmStmts Source

plusStmts :: CmmStmts -> CmmStmts -> CmmStmts Source

stmtList :: CmmStmts -> [CmmStmt]Source

isNopStmt :: CmmStmt -> Bool Source

primRepCmmType :: PrimRep -> CmmType Source

primRepForeignHint :: PrimRep -> ForeignHint Source

typeCmmType :: Type -> CmmType Source

typeForeignHint :: Type -> ForeignHint Source

isTrivialCmmExpr :: CmmExpr -> Bool Source

hasNoGlobalRegs :: CmmExpr -> Bool Source

cmmRegOff :: CmmReg -> Int -> CmmExpr Source

cmmLabelOff :: CLabel -> Int -> CmmLit Source

cmmOffset :: CmmExpr -> Int -> CmmExpr Source

cmmOffsetLit :: CmmLit -> Int -> CmmLit Source

cmmIndex :: Width -> CmmExpr -> Int -> CmmExpr Source

Useful for creating an index into an array, with a staticaly known offset. The type is the element type; used for making the multiplier

cmmOffsetExpr :: CmmExpr -> CmmExpr -> CmmExpr Source

cmmIndexExpr :: Width -> CmmExpr -> CmmExpr -> CmmExpr Source

Useful for creating an index into an array, with an unknown offset.

cmmLoadIndex :: CmmType -> CmmExpr -> Int -> CmmExpr Source

mkIntCLit :: Int -> CmmLit Source

zeroCLit :: CmmLit Source

mkLblExpr :: CLabel -> CmmExpr Source

maybeAssignTemp :: [Unique] -> CmmExpr -> ([Unique], [CmmStmt], CmmExpr)Source

loadArgsIntoTemps :: [Unique] -> HintedCmmActuals -> ([Unique], [CmmStmt], HintedCmmActuals)Source