summaryrefslogtreecommitdiff
path: root/src/tools/wasm-dis.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-02-02 18:47:39 -0800
committerGitHub <noreply@github.com>2018-02-02 18:47:39 -0800
commit874e89eec8ee4c56ecdb9e6cd68f8366fe983b79 (patch)
treeb2893c1106c8f8263c1932e70fbacce96418f1f9 /src/tools/wasm-dis.cpp
parent6b05f000e8b9249afd0838774b6bdaf64fcaf90a (diff)
downloadbinaryen-874e89eec8ee4c56ecdb9e6cd68f8366fe983b79.tar.gz
binaryen-874e89eec8ee4c56ecdb9e6cd68f8366fe983b79.tar.bz2
binaryen-874e89eec8ee4c56ecdb9e6cd68f8366fe983b79.zip
Inlining improvements (#1397)
Simplify inlining logic: don't special case the first iteration or change behavior based on when we are optimizing or not. Instead, use one simpler set of heuristics for both inlining and inlining-optimizing. We only run inlining-optimizing by default anyhow, no point to try to make inlining without optimizations useful by itself, it's not a realistic use case. (inlining is still useful for debugging, and if you will run optimizations anyhow later on everything, in which case inlining-optimizing might add some redundancy.) The simpler heuristics after this let us do a somewhat better job as we are no longer paranoid about inlining in multiple iterations. Also raise limit on inlining things that are obviously worth it from size 1 to size 2: things of size 2 will never lead to an increase in code size after we optimize (it takes at least 3 nodes to generate something that reads two locals and reverses their order, which would require a temp local in the outside scope etc.). Also fix infinite recursion of inlining an infinitely recursive set of calls.
Diffstat (limited to 'src/tools/wasm-dis.cpp')
0 files changed, 0 insertions, 0 deletions