X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FnativeGen%2FSPARC%2FShortcutJump.hs;fp=compiler%2FnativeGen%2FSPARC%2FShortcutJump.hs;h=30e48bb377ce9f51c0d36c2af7bd634dd5bf8427;hp=c0c33432db94f6482c536decb8b3dc83a3e5fafd;hb=622c3cfe2b3ebde891981544c0eea525eaa55e6f;hpb=94d7c806e2b0f1640372142a89cac2e974f5c26b 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