Commit 8acda75b authored by nr@eecs.harvard.edu's avatar nr@eecs.harvard.edu
Browse files

correct two single-identifier bugs that stopped the Adams optimization from working

parent e8b6200f
...@@ -151,7 +151,7 @@ extendPPSet g blocks procPoints = ...@@ -151,7 +151,7 @@ extendPPSet g blocks procPoints =
-- more proc points than b and is not already a proc -- more proc points than b and is not already a proc
-- point. If found, it can become a proc point. -- point. If found, it can become a proc point.
newId succ_id = not (elemBlockSet succ_id procPoints') && newId succ_id = not (elemBlockSet succ_id procPoints') &&
nreached id > my_nreached nreached succ_id > my_nreached
in listToMaybe $ filter newId $ succs b in listToMaybe $ filter newId $ succs b
...@@ -246,7 +246,7 @@ addProcPointProtocols procPoints formals g = ...@@ -246,7 +246,7 @@ addProcPointProtocols procPoints formals g =
let (Block _ t) = lookupBlockEnv (gr_blocks g) id `orElse` let (Block _ t) = lookupBlockEnv (gr_blocks g) id `orElse`
panic "jump out of graph" panic "jump out of graph"
in case t of in case t of
ZTail (CopyOut {}) (ZLast (LastOther (LastBranch pee []))) ZTail (CopyIn {}) (ZLast (LastOther (LastBranch pee [])))
| elemBlockSet pee procPoints -> Just pee | elemBlockSet pee procPoints -> Just pee
_ -> Nothing _ -> Nothing
init_protocols = fold_blocks maybe_add_proto emptyBlockEnv g init_protocols = fold_blocks maybe_add_proto emptyBlockEnv g
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment