summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Liveness.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Liveness.hs b/Liveness.hs
index 9df5484..40c555b 100644
--- a/Liveness.hs
+++ b/Liveness.hs
@@ -36,4 +36,4 @@ livenessAnalysis bblocks bidOf bbInss bbNexts fread fwrite =
bbTransFs = Map.map (foldr (.) id) insTransFs
computeFlow state = let l = iterate flowStep state in fst . head . dropWhile (uncurry (/=)) $ zip l (tail l)
flowStep state = foldl updateFlow state bids
- updateFlow state bid = Map.insert bid ((bbTransFs Map.! bid) (Set.unions (map (state Map.!) (bidNexts Map.! bid)))) state
+ updateFlow state bid = Map.insert bid (Set.unions (map (\n -> (bbTransFs Map.! n) (state Map.! n)) (bidNexts Map.! bid))) state