summaryrefslogtreecommitdiff
path: root/Optimiser.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Optimiser.hs')
-rw-r--r--Optimiser.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/Optimiser.hs b/Optimiser.hs
index c59c40e..4cff2ea 100644
--- a/Optimiser.hs
+++ b/Optimiser.hs
@@ -98,6 +98,7 @@ globalPropAssigns :: [BB] -> [BB]
globalPropAssigns bbs =
let asgmap = map ((,) <$> fst . head <*> map snd)
. groupBy ((==) `on` fst)
+ . sortOn fst
$ [pair | BB _ inss _ <- bbs, pair <- inss]
replacements = concatMap (\(dest, inss) -> case inss of
[IAssign ref@(RConst _)] -> [(dest, ref)]