Commit a38f59ae authored by Sapphie's avatar Sapphie
Browse files

Fix silly bug in blockset elimination

parent bfbb4735
......@@ -159,11 +159,11 @@ abstract class CPSOptimizer[T <: CPSTreeModule { type Name = Symbol }]
.filter(constantTags(_))
.isDefined
if (isKnownConstant) {
if (b.asName.filter(s.onlyWrittenTo).isDefined) {
shrink(body, s)
} else if (isKnownConstant) {
val newBody = shrink(body, newState.withBlockVal(b, idx, v))
LetP(name, prim, replacedArgs, newBody)
} else if (b.asName.filter(s.onlyWrittenTo).isDefined) {
shrink(body, s)
} else {
noOp
}
......
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