X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FnativeGen%2FRegAlloc%2FLiveness.hs;fp=compiler%2FnativeGen%2FRegAlloc%2FLiveness.hs;h=a4eeafc00e0bca83851f1e67209ec36b93af29d3;hp=18dd01aa1737d6e6ae88b221fe95ddd9e2a66898;hb=983b869a8333c66b4e1a07c9ba1fefc5bddbd173;hpb=20142a7dfd176c4f587adb21e1d0161018f1ec7f diff --git a/compiler/nativeGen/RegAlloc/Liveness.hs b/compiler/nativeGen/RegAlloc/Liveness.hs index 18dd01a..a4eeafc 100644 --- a/compiler/nativeGen/RegAlloc/Liveness.hs +++ b/compiler/nativeGen/RegAlloc/Liveness.hs @@ -447,9 +447,8 @@ slurpReloadCoalesce live -- | Strip away liveness information, yielding NatCmmTop - stripLive - :: Instruction instr + :: (Outputable instr, Instruction instr) => LiveCmmTop instr -> NatCmmTop instr @@ -470,8 +469,14 @@ stripLive live in CmmProc info label params (ListGraph $ map stripLiveBlock $ first' : rest') - stripCmm _ - = panic "RegAlloc.Liveness.stripLive: no first_id on proc" + -- procs used for stg_split_markers don't contain any blocks, and have no first_id. + stripCmm (CmmProc (LiveInfo info Nothing _) label params []) + = CmmProc info label params (ListGraph []) + + -- If the proc has blocks but we don't know what the first one was, then we're dead. + stripCmm proc + = pprPanic "RegAlloc.Liveness.stripLive: no first_id on proc" (ppr proc) + -- | Strip away liveness information from a basic block, -- and make real spill instructions out of SPILL, RELOAD pseudos along the way.