diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-09-12 18:33:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 18:33:14 -0700 |
commit | 559c16ea758d397fe447edbd6b09350e8471d7a6 (patch) | |
tree | 308a5f6f29d90b4b4b265a070b5e02f09a3839b1 /src | |
parent | 18adb993929883fedf24655195d988c7f5105bb1 (diff) | |
download | binaryen-559c16ea758d397fe447edbd6b09350e8471d7a6.tar.gz binaryen-559c16ea758d397fe447edbd6b09350e8471d7a6.tar.bz2 binaryen-559c16ea758d397fe447edbd6b09350e8471d7a6.zip |
Note that calls to imports are not lightweight in inlining pass (#1673)
* call_import is not lightweight for inlining purposes - we had call but not callimport, which is even less light
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/Inlining.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/passes/Inlining.cpp b/src/passes/Inlining.cpp index 67613fa47..a507e5fc8 100644 --- a/src/passes/Inlining.cpp +++ b/src/passes/Inlining.cpp @@ -117,6 +117,11 @@ struct FunctionInfoScanner : public WalkerPass<PostWalker<FunctionInfoScanner>> (*infos)[getFunction()->name].lightweight = false; } + void visitCallImport(CallImport* curr) { + // having a call is not lightweight + (*infos)[getFunction()->name].lightweight = false; + } + void visitFunction(Function* curr) { (*infos)[curr->name].size = Measurer::measure(curr->body); } |