// Should we run this pass on the current scope before running it on nested scopes?
public boolean isPreOrder() { return false; }
public void run(IRScope s) {
if (s instanceof IRExecutionScope) {
IRExecutionScope es = (IRExecutionScope)s;
// Run this pass on nested closures first!
// This let us compute execute scope flags for a method based on what all nested closures do
List<IRClosure> closures = es.getClosures();
for (IRClosure c: closures)
run(c);
// Now, run on current scope
runLocalOpts(es);
// Only after running local opts, compute various execution scope flags
es.computeExecutionScopeFlags();
}
}