diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-08-07 15:43:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-07 15:43:36 -0700 |
commit | 4f0bf336e0e04ec349c7524d86ffd2c4066cb644 (patch) | |
tree | d50a12f9701f8eb4b5f28770cf43a55877c931a8 /test/unit.asm.js | |
parent | b93ea39b239052314123d3641df29ff5c5730515 (diff) | |
download | binaryen-4f0bf336e0e04ec349c7524d86ffd2c4066cb644.tar.gz binaryen-4f0bf336e0e04ec349c7524d86ffd2c4066cb644.tar.bz2 binaryen-4f0bf336e0e04ec349c7524d86ffd2c4066cb644.zip |
Improve and enable inlining pass (#966)
* improve inlining pass to inline single-use functions that are fairly small, which makes it useful for removing unnecessary global constructors from clang. add an inlining-optimizing pass that also optimizes where it inlined, as new opportunities arise. enable that it by default in O2+
* fix a bug where we didn't run all passes properly - refactor addDefaultGlobalOptimizationPasses() into a pre and post version. we can only run the post version in incremental optimizing builds (functions appear one by one, we optimize them first, and do global stuff when all are done), but can run both when doing a full optimize
* copy in inlining, allowing multiple inlinings of the same function in the future
Diffstat (limited to 'test/unit.asm.js')
-rw-r--r-- | test/unit.asm.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index 22e2cf9b4..a1accabf5 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -726,6 +726,7 @@ function asm(global, env, buffer) { function keepAlive() { sqrts(3.14159); + sqrts(2.18281); // don't inline it either f2u(100.0); f2s(100.0); autoDrop(52) | 0; |