summaryrefslogtreecommitdiff
path: root/src/passes/OptimizeAddedConstants.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-05-05 19:12:01 -0700
committerGitHub <noreply@github.com>2021-05-05 19:12:01 -0700
commit16dc2d06041473b838e5486a620e53416ff7e9fd (patch)
tree937ae665e582fd90107fe6e60ea9deac6fc2d6bc /src/passes/OptimizeAddedConstants.cpp
parent5387a0b1ffcaf925b40ee661063893c475d4c632 (diff)
downloadbinaryen-16dc2d06041473b838e5486a620e53416ff7e9fd.tar.gz
binaryen-16dc2d06041473b838e5486a620e53416ff7e9fd.tar.bz2
binaryen-16dc2d06041473b838e5486a620e53416ff7e9fd.zip
Allow only computing necessary influences in LocalGraph. NFC (#3861)
Some passes need setInfluences but not getInfluences, but were computing them nonetheless. This makes e.g. MergeLocals 12% faster. It will also help use LocalGraph in new passes with less worries about speed.
Diffstat (limited to 'src/passes/OptimizeAddedConstants.cpp')
-rw-r--r--src/passes/OptimizeAddedConstants.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/OptimizeAddedConstants.cpp b/src/passes/OptimizeAddedConstants.cpp
index e5cbf108a..107b06ffb 100644
--- a/src/passes/OptimizeAddedConstants.cpp
+++ b/src/passes/OptimizeAddedConstants.cpp
@@ -277,7 +277,7 @@ struct OptimizeAddedConstants
propagatable.clear();
if (propagate) {
localGraph = make_unique<LocalGraph>(func);
- localGraph->computeInfluences();
+ localGraph->computeSetInfluences();
localGraph->computeSSAIndexes();
findPropagatable();
}