diff options
author | Alon Zakai <azakai@google.com> | 2021-09-27 16:13:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-27 16:13:48 -0700 |
commit | a34746c6708cd3e9d0c6ae554cd6bd40d43bb5b8 (patch) | |
tree | 9748125f12935863df63c1d9df64a9b290e3ea8c /src/passes/Inlining.cpp | |
parent | 11552aef2a36cb90c0d7087644871777cc4a0ef7 (diff) | |
download | binaryen-a34746c6708cd3e9d0c6ae554cd6bd40d43bb5b8.tar.gz binaryen-a34746c6708cd3e9d0c6ae554cd6bd40d43bb5b8.tar.bz2 binaryen-a34746c6708cd3e9d0c6ae554cd6bd40d43bb5b8.zip |
Disable partial inlining by default and add a flag for it. (#4191)
Locally I saw a 10% speedup on j2cl but reports of regressions have
arrived, so let's disable it for now pending investigation. The option added
here should make it easy to experiment.
Diffstat (limited to 'src/passes/Inlining.cpp')
-rw-r--r-- | src/passes/Inlining.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/passes/Inlining.cpp b/src/passes/Inlining.cpp index e1ae4c2a8..7467d2559 100644 --- a/src/passes/Inlining.cpp +++ b/src/passes/Inlining.cpp @@ -641,8 +641,7 @@ private: // without an else. // Find the number of ifs. - // TODO: Investigate more values here. 4 appears useful on real-world code. - const Index MaxIfs = 4; + const Index MaxIfs = options.inlining.partialInliningIfs; Index numIfs = 0; while (getIf(body, numIfs) && numIfs <= MaxIfs) { numIfs++; |