X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FSPARC%2FShortcutJump.hs;h=30e48bb377ce9f51c0d36c2af7bd634dd5bf8427;hb=18691d440f90a3dff4ef538091c886af505e5cf5;hp=c0c33432db94f6482c536decb8b3dc83a3e5fafd;hpb=889c084e943779e76d19f2ef5e970ff655f511eb;p=ghc-hetmet.git diff --git a/compiler/nativeGen/SPARC/ShortcutJump.hs b/compiler/nativeGen/SPARC/ShortcutJump.hs index c0c3343..30e48bb 100644 --- a/compiler/nativeGen/SPARC/ShortcutJump.hs +++ b/compiler/nativeGen/SPARC/ShortcutJump.hs @@ -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