summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/RegAlloc/Graph/Main.hs
diff options
context:
space:
mode:
authorbenl@ouroborus.net <unknown>2010-06-24 08:27:17 +0000
committerbenl@ouroborus.net <unknown>2010-06-24 08:27:17 +0000
commita4e89052ca5163bc1a33b5096b50e5a3fbb9fbd5 (patch)
tree806cbb2024abdb408ffe22b88952a07f764797cf /compiler/nativeGen/RegAlloc/Graph/Main.hs
parent1c0deb50a7d84e14e0a425a0e1b4293c19718bb3 (diff)
downloadhaskell-a4e89052ca5163bc1a33b5096b50e5a3fbb9fbd5.tar.gz
NCG: Do the actual reversing of SCCs
Diffstat (limited to 'compiler/nativeGen/RegAlloc/Graph/Main.hs')
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/Main.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs
index 6b01298ac6..069c8c0069 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 =