|
|
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data CmmType |
Instances | |
|
|
| b8 :: CmmType |
|
| b16 :: CmmType |
|
| b32 :: CmmType |
|
| b64 :: CmmType |
|
| f32 :: CmmType |
|
| f64 :: CmmType |
|
| bWord :: CmmType |
|
| bHalfWord :: CmmType |
|
| gcWord :: CmmType |
|
| cInt :: CmmType |
|
| cLong :: CmmType |
|
| cmmBits :: Width -> CmmType |
|
| cmmFloat :: Width -> CmmType |
|
| typeWidth :: CmmType -> Width |
|
| cmmEqType :: CmmType -> CmmType -> Bool |
|
| cmmEqType_ignoring_ptrhood :: CmmType -> CmmType -> Bool |
|
| isFloatType :: CmmType -> Bool |
|
| isGcPtrType :: CmmType -> Bool |
|
| isWord32 :: CmmType -> Bool |
|
| isWord64 :: CmmType -> Bool |
|
| isFloat64 :: CmmType -> Bool |
|
| isFloat32 :: CmmType -> Bool |
|
| data Width |
| Constructors | | Instances | |
|
|
| widthInBits :: Width -> Int |
|
| widthInBytes :: Width -> Int |
|
| widthInLog :: Width -> Int |
|
| widthFromBytes :: Int -> Width |
|
| wordWidth :: Width |
|
| halfWordWidth :: Width |
|
| cIntWidth :: Width |
|
| cLongWidth :: Width |
|
| narrowU :: Width -> Integer -> Integer |
|
| narrowS :: Width -> Integer -> Integer |
|
| data CmmExpr |
| Constructors | | Instances | |
|
|
| cmmExprType :: CmmExpr -> CmmType |
|
| cmmExprWidth :: CmmExpr -> Width |
|
| maybeInvertCmmExpr :: CmmExpr -> Maybe CmmExpr |
|
| data CmmReg |
| Constructors | | Instances | |
|
|
| cmmRegType :: CmmReg -> CmmType |
|
| data CmmLit |
| Constructors | | Instances | |
|
|
| cmmLitType :: CmmLit -> CmmType |
|
| data LocalReg |
| Constructors | | Instances | |
|
|
| localRegType :: LocalReg -> CmmType |
|
| data GlobalReg |
| Constructors | | VanillaReg !Int VGcPtr | | | FloatReg !Int | | | DoubleReg !Int | | | LongReg !Int | | | Sp | | | SpLim | | | Hp | | | HpLim | | | CurrentTSO | | | CurrentNursery | | | HpAlloc | | | EagerBlackholeInfo | | | GCEnter1 | | | GCFun | | | BaseReg | | | PicBaseReg | |
| Instances | |
|
|
| globalRegType :: GlobalReg -> CmmType |
|
| spReg :: CmmReg |
|
| hpReg :: CmmReg |
|
| spLimReg :: CmmReg |
|
| nodeReg :: CmmReg |
|
| node :: GlobalReg |
|
| data VGcPtr |
| Constructors | | Instances | |
|
|
| vgcFlag :: CmmType -> VGcPtr |
|
| class DefinerOfLocalRegs a where |
| | Methods | | foldRegsDefd :: (b -> LocalReg -> b) -> b -> a -> b |
| | Instances | |
|
|
| class UserOfLocalRegs a where |
| | Methods | | foldRegsUsed :: (b -> LocalReg -> b) -> b -> a -> b |
| | Instances | |
|
|
| filterRegsUsed :: UserOfLocalRegs e => (LocalReg -> Bool) -> e -> RegSet |
|
| class DefinerOfSlots a where |
| | Methods | | foldSlotsDefd :: (b -> SubArea -> b) -> b -> a -> b |
| | Instances | |
|
|
| class UserOfSlots a where |
| | Methods | | foldSlotsUsed :: (b -> SubArea -> b) -> b -> a -> b |
| | Instances | |
|
|
| type RegSet = UniqSet LocalReg |
| Sets of local registers
|
|
| emptyRegSet :: RegSet |
|
| elemRegSet :: LocalReg -> RegSet -> Bool |
|
| extendRegSet :: RegSet -> LocalReg -> RegSet |
|
| deleteFromRegSet :: RegSet -> LocalReg -> RegSet |
|
| mkRegSet :: [LocalReg] -> RegSet |
|
| plusRegSet :: RegSet -> RegSet -> RegSet |
|
| minusRegSet :: RegSet -> RegSet -> RegSet |
|
| timesRegSet :: RegSet -> RegSet -> RegSet |
|
| 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 | | Instances | |
|
|
| data AreaId |
| Constructors | | Instances | |
|
|
| type SubArea = (Area, Int, Int) |
|
| type SubAreaSet = FiniteMap Area [SubArea] |
|
| type AreaMap = FiniteMap Area Int |
|
| isStackSlotOf :: CmmExpr -> LocalReg -> Bool |
|
| data MachOp |
Machine-level primops; ones which we can reasonably delegate to the
native code generators to handle. Basically contains C's primops
and no others.
Nomenclature: all ops indicate width and signedness, where
appropriate. Widths: 8/16/32/64 means the given size, obviously.
Nat means the operation works on STG word sized objects.
Signedness: S means signed, U means unsigned. For operations where
signedness is irrelevant or makes no difference (for example
integer add), the signedness component is omitted.
An exception: NatP is a ptr-typed native word. From the point of
view of the native code generators this distinction is irrelevant,
but the C code generator sometimes needs this info to emit the
right casts.
| | Constructors | | Instances | |
|
|
| pprMachOp :: MachOp -> SDoc |
|
| isCommutableMachOp :: MachOp -> Bool |
Returns True if the MachOp has commutable arguments. This is used
in the platform-independent Cmm optimisations.
If in doubt, return False. This generates worse code on the
native routes, but is otherwise harmless.
|
|
| isAssociativeMachOp :: MachOp -> Bool |
Returns True if the MachOp is associative (i.e. (x+y)+z == x+(y+z))
This is used in the platform-independent Cmm optimisations.
If in doubt, return False. This generates worse code on the
native routes, but is otherwise harmless.
|
|
| isComparisonMachOp :: MachOp -> Bool |
Returns True if the MachOp is a comparison.
If in doubt, return False. This generates worse code on the
native routes, but is otherwise harmless.
|
|
| machOpResultType :: MachOp -> [CmmType] -> CmmType |
| Returns the MachRep of the result of a MachOp.
|
|
| machOpArgReps :: MachOp -> [Width] |
| This function is used for debugging only: we can check whether an
application of a MachOp is type-correct by checking that the MachReps of
its arguments are the same as the MachOp expects. This is used when
linting a CmmExpr.
|
|
| maybeInvertComparison :: MachOp -> Maybe MachOp |
|
| mo_wordAdd :: MachOp |
|
| mo_wordSub :: MachOp |
|
| mo_wordEq :: MachOp |
|
| mo_wordNe :: MachOp |
|
| mo_wordMul :: MachOp |
|
| mo_wordSQuot :: MachOp |
|
| mo_wordSRem :: MachOp |
|
| mo_wordSNeg :: MachOp |
|
| mo_wordUQuot :: MachOp |
|
| mo_wordURem :: MachOp |
|
| mo_wordSGe :: MachOp |
|
| mo_wordSLe :: MachOp |
|
| mo_wordSGt :: MachOp |
|
| mo_wordSLt :: MachOp |
|
| mo_wordUGe :: MachOp |
|
| mo_wordULe :: MachOp |
|
| mo_wordUGt :: MachOp |
|
| mo_wordULt :: MachOp |
|
| mo_wordAnd :: MachOp |
|
| mo_wordOr :: MachOp |
|
| mo_wordXor :: MachOp |
|
| mo_wordNot :: MachOp |
|
| mo_wordShl :: MachOp |
|
| mo_wordSShr :: MachOp |
|
| mo_wordUShr :: MachOp |
|
| mo_u_8To32 :: MachOp |
|
| mo_s_8To32 :: MachOp |
|
| mo_u_16To32 :: MachOp |
|
| mo_s_16To32 :: MachOp |
|
| mo_u_8ToWord :: MachOp |
|
| mo_s_8ToWord :: MachOp |
|
| mo_u_16ToWord :: MachOp |
|
| mo_s_16ToWord :: MachOp |
|
| mo_u_32ToWord :: MachOp |
|
| mo_s_32ToWord :: MachOp |
|
| mo_32To8 :: MachOp |
|
| mo_32To16 :: MachOp |
|
| mo_WordTo8 :: MachOp |
|
| mo_WordTo16 :: MachOp |
|
| mo_WordTo32 :: MachOp |
|
| Produced by Haddock version 2.7.2 |