Skip to content

Commit

Permalink
Run coalesce-locals after the final simplify-locals.
Browse files Browse the repository at this point in the history
We now emit more sets and tees of if-elses from simplify-locals, and
coalesce-locals is necessary to remove them if they are ineffectual,
that is, if no get will read them.
  • Loading branch information
kripken committed Dec 4, 2018
1 parent f5b8221 commit b4badb8
Show file tree
Hide file tree
Showing 19 changed files with 3,435 additions and 3,619 deletions.
5 changes: 4 additions & 1 deletion src/passes/pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,11 @@ void PassRunner::addDefaultFunctionOptimizationPasses() {
}
add("coalesce-locals");
add("simplify-locals");
add("vacuum"); // previous pass creates garbage
add("vacuum");
add("reorder-locals");
add("coalesce-locals");
add("reorder-locals");
add("vacuum");
if (options.optimizeLevel >= 3 || options.shrinkLevel >= 1) {
add("code-folding");
}
Expand Down
Loading

0 comments on commit b4badb8

Please sign in to comment.