diff options
author | Alon Zakai <azakai@google.com> | 2019-03-06 14:21:07 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2019-03-06 16:34:34 -0800 |
commit | 7e56e5b9eb08a68631d98f6d0d7db2adc2cd8236 (patch) | |
tree | ad2a1c076f5f450a2a9aaee6c4077bff0108971e /src | |
parent | 83aa0dc2daf327ed264cc22e51af1a866787a764 (diff) | |
download | binaryen-7e56e5b9eb08a68631d98f6d0d7db2adc2cd8236.tar.gz binaryen-7e56e5b9eb08a68631d98f6d0d7db2adc2cd8236.tar.bz2 binaryen-7e56e5b9eb08a68631d98f6d0d7db2adc2cd8236.zip |
CoalesceLocals: run even if we have just 1 var, as we may be able to remove that one var by reusing a param
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/CoalesceLocals.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/passes/CoalesceLocals.cpp b/src/passes/CoalesceLocals.cpp index 1bcc74f79..a7c8b7fc0 100644 --- a/src/passes/CoalesceLocals.cpp +++ b/src/passes/CoalesceLocals.cpp @@ -279,11 +279,6 @@ void CoalesceLocals::pickIndices(std::vector<Index>& indices) { indices.push_back(0); return; } - if (getFunction()->getNumVars() <= 1) { - // nothing to think about here, since we can't reorder params - indices = makeIdentity(numLocals); - return; - } // take into account total copies. but we must keep params in place, so give them max priority auto adjustedTotalCopies = totalCopies; auto numParams = getFunction()->getNumParams(); |