Commit 47ca6522 authored by Paul's avatar Paul
Browse files

Reduce nesting

parent ac031de5
...@@ -33,8 +33,11 @@ void propagate_constant::apply(program& p) const ...@@ -33,8 +33,11 @@ void propagate_constant::apply(program& p) const
ins->outputs().end()); ins->outputs().end());
for(auto child : children) for(auto child : children)
{ {
if(not skip_propogate(child)) if (skip_propogate(child))
{ {
self(child);
continue;
}
auto r = child->eval(); auto r = child->eval();
if(not r.empty()) if(not r.empty())
{ {
...@@ -43,11 +46,6 @@ void propagate_constant::apply(program& p) const ...@@ -43,11 +46,6 @@ void propagate_constant::apply(program& p) const
self(p.replace_instruction(child, l)); self(p.replace_instruction(child, l));
} }
} }
else
{
self(child);
}
}
})(i); })(i);
} }
} }
......
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