aboutsummaryrefslogtreecommitdiff
path: root/RegAlloc.hs
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-08-20 11:17:05 +0200
committertomsmeding <tom.smeding@gmail.com>2017-08-20 11:17:05 +0200
commit965f8bf85d7850be074bad735d815b15a85a3de0 (patch)
tree915cb183c943c503c4b4a561679b7edc2e4a2938 /RegAlloc.hs
parent694ec05bcad01fd27606aace73b49cdade16945e (diff)
Second
Diffstat (limited to 'RegAlloc.hs')
-rw-r--r--RegAlloc.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/RegAlloc.hs b/RegAlloc.hs
index d2b1717..3a41aac 100644
--- a/RegAlloc.hs
+++ b/RegAlloc.hs
@@ -42,8 +42,7 @@ regalloc vars' regs aliaspairs =
AllocReg r -> Just r
in if length (stActive st) == length regs
then spillAtInterval st index
- else let -- ([regchoice], fr) = splitAt 1 (stFreeRegs st)
- (regchoice, fr) = case find (`elem` wantedregs) (stFreeRegs st) of
+ else let (regchoice, fr) = case find (`elem` wantedregs) (stFreeRegs st) of
Nothing -> (head (stFreeRegs st), tail (stFreeRegs st))
Just wr -> trace ("Pair-allocated " ++ show name ++ " in " ++ show wr) $
(wr, stFreeRegs st \\ [wr])