module SPARC.ShortcutJump (
- JumpDest(..),
+ JumpDest(..), getJumpDestBlockId,
canShortcut,
shortcutJump,
shortcutStatic,
= DestBlockId BlockId
| DestImm Imm
+getJumpDestBlockId :: JumpDest -> Maybe BlockId
+getJumpDestBlockId (DestBlockId bid) = Just bid
+getJumpDestBlockId _ = Nothing
+
canShortcut :: Instr -> Maybe JumpDest
canShortcut _ = Nothing