summaryrefslogtreecommitdiff
path: root/src/pass.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pass.h')
-rw-r--r--src/pass.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pass.h b/src/pass.h
index 3b055cee9..7b42e3719 100644
--- a/src/pass.h
+++ b/src/pass.h
@@ -69,14 +69,15 @@ struct InliningOptions {
// More generally, with 2 items we may have a local.get, but no way to
// require it to be saved instead of directly consumed.
Index alwaysInlineMaxSize = 2;
- // Function size which we inline when functions are lightweight (no loops
- // and calls) and we are doing aggressive optimisation for speed (-O3).
- // In particular it's nice that with this limit we can inline the clamp
- // functions (i32s-div, f64-to-int, etc.), that can affect perf.
- Index flexibleInlineMaxSize = 20;
// Function size which we inline when there is only one caller.
// FIXME: this should logically be higher than flexibleInlineMaxSize.
Index oneCallerInlineMaxSize = 15;
+ // Function size above which we never inline, ignoring the various flexible
+ // factors (like whether we are optimizing for size or speed) that could
+ // influence us.
+ // This is checked after alwaysInlineMaxSize and oneCallerInlineMaxSize, but
+ // the order normally won't matter.
+ Index flexibleInlineMaxSize = 20;
// Loops usually mean the function does heavy work, so the call overhead
// is not significant and we do not inline such functions by default.
bool allowFunctionsWithLoops = false;