X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FRegAlloc%2FGraph%2FMain.hs;fp=compiler%2FnativeGen%2FRegAlloc%2FGraph%2FMain.hs;h=069c8c0069fe6cf2c966a868c777f99c2d7c3e7e;hb=a4e89052ca5163bc1a33b5096b50e5a3fbb9fbd5;hp=6b01298ac68e1c2423d9d07a03d149f17d1c0336;hpb=1c0deb50a7d84e14e0a425a0e1b4293c19718bb3;p=ghc-hetmet.git diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs index 6b01298..069c8c0 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Main.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs @@ -212,8 +212,10 @@ regAlloc_spin <- regSpill code_coalesced slotsFree rsSpill -- recalculate liveness --- let code_nat = map stripLive code_spilled - code_relive <- mapM regLiveness code_spilled + -- NOTE: we have to reverse the SCCs here to get them back into the reverse-dependency + -- order required by computeLiveness. If they're not in the correct order + -- that function will panic. + code_relive <- mapM (regLiveness . reverseBlocksInTops) code_spilled -- record what happened in this stage for debugging let stat =