merge GHC HEAD
[ghc-hetmet.git] / compiler / nativeGen / SPARC / ShortcutJump.hs
index c0c3343..30e48bb 100644 (file)
@@ -1,6 +1,6 @@
 
 module SPARC.ShortcutJump (
-       JumpDest(..),
+       JumpDest(..), getJumpDestBlockId,
        canShortcut,
        shortcutJump,
        shortcutStatic,
@@ -25,6 +25,10 @@ data JumpDest
        = DestBlockId BlockId 
        | DestImm Imm
 
+getJumpDestBlockId :: JumpDest -> Maybe BlockId
+getJumpDestBlockId (DestBlockId bid) = Just bid
+getJumpDestBlockId _                 = Nothing
+
 
 canShortcut :: Instr -> Maybe JumpDest
 canShortcut _ = Nothing