diff options
Diffstat (limited to 'src/passes/ReorderLocals.cpp')
-rw-r--r-- | src/passes/ReorderLocals.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/passes/ReorderLocals.cpp b/src/passes/ReorderLocals.cpp index 45796c0aa..e5e01af5d 100644 --- a/src/passes/ReorderLocals.cpp +++ b/src/passes/ReorderLocals.cpp @@ -47,16 +47,19 @@ struct ReorderLocals : public WalkerPass<PostWalker<ReorderLocals>> { // sort, keeping params in front (where they will not be moved) sort( newToOld.begin(), newToOld.end(), [this, curr](Index a, Index b) -> bool { - if (curr->isParam(a) && !curr->isParam(b)) + if (curr->isParam(a) && !curr->isParam(b)) { return true; - if (curr->isParam(b) && !curr->isParam(a)) + } + if (curr->isParam(b) && !curr->isParam(a)) { return false; + } if (curr->isParam(b) && curr->isParam(a)) { return a < b; } if (counts[a] == counts[b]) { - if (counts[a] == 0) + if (counts[a] == 0) { return a < b; + } return firstUses[a] < firstUses[b]; } return counts[a] > counts[b]; |