From 7e56e5b9eb08a68631d98f6d0d7db2adc2cd8236 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 6 Mar 2019 14:21:07 -0800 Subject: CoalesceLocals: run even if we have just 1 var, as we may be able to remove that one var by reusing a param --- src/passes/CoalesceLocals.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') 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& 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(); -- cgit v1.2.3