diff options
Diffstat (limited to 'compiler/GHC/CmmToAsm/AArch64/RegInfo.hs')
-rw-r--r-- | compiler/GHC/CmmToAsm/AArch64/RegInfo.hs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/compiler/GHC/CmmToAsm/AArch64/RegInfo.hs b/compiler/GHC/CmmToAsm/AArch64/RegInfo.hs new file mode 100644 index 0000000000..8c3d081e92 --- /dev/null +++ b/compiler/GHC/CmmToAsm/AArch64/RegInfo.hs @@ -0,0 +1,31 @@ +module GHC.CmmToAsm.AArch64.RegInfo where + +import GHC.Prelude + +import GHC.CmmToAsm.AArch64.Instr +import GHC.Cmm.BlockId +import GHC.Cmm + +import GHC.Utils.Outputable + +data JumpDest = DestBlockId BlockId + +-- Debug Instance +instance Outputable JumpDest where + ppr (DestBlockId bid) = text "jd<blk>:" <> ppr bid + +-- TODO: documen what this does. See Ticket 19914 +getJumpDestBlockId :: JumpDest -> Maybe BlockId +getJumpDestBlockId (DestBlockId bid) = Just bid + +-- TODO: document what this does. See Ticket 19914 +canShortcut :: Instr -> Maybe JumpDest +canShortcut _ = Nothing + +-- TODO: document what this does. See Ticket 19914 +shortcutStatics :: (BlockId -> Maybe JumpDest) -> RawCmmStatics -> RawCmmStatics +shortcutStatics _ other_static = other_static + +-- TODO: document what this does. See Ticket 19914 +shortcutJump :: (BlockId -> Maybe JumpDest) -> Instr -> Instr +shortcutJump _ other = other |