Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- primRepCmmType :: Platform -> PrimRep -> CmmType
- slotCmmType :: Platform -> SlotTy -> CmmType
- slotForeignHint :: SlotTy -> ForeignHint
- typeCmmType :: Platform -> UnaryType -> CmmType
- typeForeignHint :: UnaryType -> ForeignHint
- primRepForeignHint :: PrimRep -> ForeignHint
- zeroCLit :: Platform -> CmmLit
- mkIntCLit :: Platform -> Int -> CmmLit
- mkWordCLit :: Platform -> Integer -> CmmLit
- packHalfWordsCLit :: Platform -> StgHalfWord -> StgHalfWord -> CmmLit
- mkByteStringCLit :: CLabel -> ByteString -> (CmmLit, GenCmmDecl (GenCmmStatics raw) info stmt)
- mkFileEmbedLit :: CLabel -> FilePath -> (CmmLit, GenCmmDecl (GenCmmStatics raw) info stmt)
- mkDataLits :: Section -> CLabel -> [CmmLit] -> GenCmmDecl (GenCmmStatics raw) info stmt
- mkRODataLits :: CLabel -> [CmmLit] -> GenCmmDecl (GenCmmStatics raw) info stmt
- mkStgWordCLit :: Platform -> StgWord -> CmmLit
- mkIntExpr :: Platform -> Int -> CmmExpr
- zeroExpr :: Platform -> CmmExpr
- mkLblExpr :: CLabel -> CmmExpr
- cmmRegOff :: CmmReg -> Int -> CmmExpr
- cmmOffset :: Platform -> CmmExpr -> Int -> CmmExpr
- cmmLabelOff :: CLabel -> Int -> CmmLit
- cmmOffsetLit :: CmmLit -> Int -> CmmLit
- cmmOffsetExpr :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmRegOffB :: CmmReg -> ByteOff -> CmmExpr
- cmmOffsetB :: Platform -> CmmExpr -> ByteOff -> CmmExpr
- cmmLabelOffB :: CLabel -> ByteOff -> CmmLit
- cmmOffsetLitB :: CmmLit -> ByteOff -> CmmLit
- cmmOffsetExprB :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmRegOffW :: Platform -> CmmReg -> WordOff -> CmmExpr
- cmmOffsetW :: Platform -> CmmExpr -> WordOff -> CmmExpr
- cmmLabelOffW :: Platform -> CLabel -> WordOff -> CmmLit
- cmmOffsetLitW :: Platform -> CmmLit -> WordOff -> CmmLit
- cmmOffsetExprW :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmIndex :: Platform -> Width -> CmmExpr -> Int -> CmmExpr
- cmmIndexExpr :: Platform -> Width -> CmmExpr -> CmmExpr -> CmmExpr
- cmmLoadIndex :: Platform -> CmmType -> CmmExpr -> Int -> CmmExpr
- cmmLoadIndexW :: Platform -> CmmExpr -> Int -> CmmType -> CmmExpr
- cmmNegate :: Platform -> CmmExpr -> CmmExpr
- cmmULtWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmUGeWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmUGtWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmUShrWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmSLtWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmNeWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmEqWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmOrWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmAndWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmSubWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmAddWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmMulWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmQuotWord :: Platform -> CmmExpr -> CmmExpr -> CmmExpr
- cmmToWord :: Platform -> CmmExpr -> CmmExpr
- cmmMkAssign :: Platform -> CmmExpr -> Unique -> (CmmNode O O, CmmExpr)
- isTrivialCmmExpr :: CmmExpr -> Bool
- hasNoGlobalRegs :: CmmExpr -> Bool
- isLit :: CmmExpr -> Bool
- isComparisonExpr :: CmmExpr -> Bool
- baseExpr :: CmmExpr
- spExpr :: CmmExpr
- hpExpr :: CmmExpr
- spLimExpr :: CmmExpr
- hpLimExpr :: CmmExpr
- currentTSOExpr :: CmmExpr
- currentNurseryExpr :: CmmExpr
- cccsExpr :: CmmExpr
- cmmTagMask :: DynFlags -> CmmExpr
- cmmPointerMask :: DynFlags -> CmmExpr
- cmmUntag :: DynFlags -> CmmExpr -> CmmExpr
- cmmIsTagged :: DynFlags -> CmmExpr -> CmmExpr
- cmmConstrTag1 :: DynFlags -> CmmExpr -> CmmExpr
- regsOverlap :: Platform -> CmmReg -> CmmReg -> Bool
- regUsedIn :: Platform -> CmmReg -> CmmExpr -> Bool
- mkLiveness :: Platform -> [LocalReg] -> Liveness
- modifyGraph :: (Graph n C C -> Graph n' C C) -> GenCmmGraph n -> GenCmmGraph n'
- ofBlockMap :: BlockId -> LabelMap CmmBlock -> CmmGraph
- toBlockMap :: CmmGraph -> LabelMap CmmBlock
- ofBlockList :: BlockId -> [CmmBlock] -> CmmGraph
- toBlockList :: CmmGraph -> [CmmBlock]
- bodyToBlockList :: Body CmmNode -> [CmmBlock]
- toBlockListEntryFirst :: CmmGraph -> [CmmBlock]
- toBlockListEntryFirstFalseFallthrough :: CmmGraph -> [CmmBlock]
- foldlGraphBlocks :: (a -> CmmBlock -> a) -> a -> CmmGraph -> a
- mapGraphNodes :: (CmmNode C O -> CmmNode C O, CmmNode O O -> CmmNode O O, CmmNode O C -> CmmNode O C) -> CmmGraph -> CmmGraph
- revPostorder :: CmmGraph -> [CmmBlock]
- mapGraphNodes1 :: (forall e x. CmmNode e x -> CmmNode e x) -> CmmGraph -> CmmGraph
- blockTicks :: Block CmmNode C C -> [CmmTickish]
Documentation
slotForeignHint :: SlotTy -> ForeignHint Source #
packHalfWordsCLit :: Platform -> StgHalfWord -> StgHalfWord -> CmmLit Source #
mkByteStringCLit :: CLabel -> ByteString -> (CmmLit, GenCmmDecl (GenCmmStatics raw) info stmt) Source #
We make a top-level decl for the string, and return a label pointing to it
mkFileEmbedLit :: CLabel -> FilePath -> (CmmLit, GenCmmDecl (GenCmmStatics raw) info stmt) Source #
We make a top-level decl for the embedded binary file, and return a label pointing to it
mkDataLits :: Section -> CLabel -> [CmmLit] -> GenCmmDecl (GenCmmStatics raw) info stmt Source #
Build a data-segment data block
mkRODataLits :: CLabel -> [CmmLit] -> GenCmmDecl (GenCmmStatics raw) info stmt Source #
cmmIndex :: Platform -> Width -> CmmExpr -> Int -> CmmExpr Source #
Useful for creating an index into an array, with a statically known offset. The type is the element type; used for making the multiplier
cmmIndexExpr :: Platform -> Width -> CmmExpr -> CmmExpr -> CmmExpr Source #
Useful for creating an index into an array, with an unknown offset.
isTrivialCmmExpr :: CmmExpr -> Bool Source #
hasNoGlobalRegs :: CmmExpr -> Bool Source #
isComparisonExpr :: CmmExpr -> Bool Source #
cmmTagMask :: DynFlags -> CmmExpr Source #
cmmPointerMask :: DynFlags -> CmmExpr Source #
regsOverlap :: Platform -> CmmReg -> CmmReg -> Bool Source #
Returns True if the two STG registers overlap on the specified platform, in the sense that writing to one will clobber the other. This includes the case that the two registers are the same STG register. See Note [Overlapping global registers] for details.
regUsedIn :: Platform -> CmmReg -> CmmExpr -> Bool Source #
Returns True if the STG register is used by the expression, in the sense that a store to the register might affect the value of the expression.
We must check for overlapping registers and not just equal registers here, otherwise CmmSink may incorrectly reorder assignments that conflict due to overlap. See #10521 and Note [Overlapping global registers].
Operations that probably don't belong here
modifyGraph :: (Graph n C C -> Graph n' C C) -> GenCmmGraph n -> GenCmmGraph n' Source #
toBlockList :: CmmGraph -> [CmmBlock] Source #
toBlockListEntryFirst :: CmmGraph -> [CmmBlock] Source #
like toBlockList
, but the entry block always comes first
toBlockListEntryFirstFalseFallthrough :: CmmGraph -> [CmmBlock] Source #
Like toBlockListEntryFirst
, but we strive to ensure that we order blocks
so that the false case of a conditional jumps to the next block in the output
list of blocks. This matches the way OldCmm blocks were output since in
OldCmm the false case was a fallthrough, whereas in Cmm conditional branches
have both true and false successors. Block ordering can make a big difference
in performance in the LLVM backend. Note that we rely crucially on the order
of successors returned for CmmCondBranch by the NonLocal instance for CmmNode
defined in GHC.Cmm.Node. -GBM
foldlGraphBlocks :: (a -> CmmBlock -> a) -> a -> CmmGraph -> a Source #
mapGraphNodes :: (CmmNode C O -> CmmNode C O, CmmNode O O -> CmmNode O O, CmmNode O C -> CmmNode O C) -> CmmGraph -> CmmGraph Source #
revPostorder :: CmmGraph -> [CmmBlock] Source #
Ticks
blockTicks :: Block CmmNode C C -> [CmmTickish] Source #
Extract all tick annotations from the given block