diff options
author | Alon Zakai <azakai@google.com> | 2021-08-09 17:47:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 00:47:29 +0000 |
commit | d1fb1e4742e259ebeec7119518169597e75b0b9d (patch) | |
tree | de969595a4be3c183e5079cd6f9ebdba24b6a3db /src/passes/LocalSubtyping.cpp | |
parent | 0732425cd876127f22abd0a36e883caa5c8f7857 (diff) | |
download | binaryen-d1fb1e4742e259ebeec7119518169597e75b0b9d.tar.gz binaryen-d1fb1e4742e259ebeec7119518169597e75b0b9d.tar.bz2 binaryen-d1fb1e4742e259ebeec7119518169597e75b0b9d.zip |
Improve inlining limits for recursion (#4067)
Previously we would keep doing iterations of inlining until we hit
the number of functions in the module (at which point, we would
definitely know we are recursing). This prevents infinite recursion,
but it can take a very very long time to notice that in a huge
module with one tiny recursive function and 100,000 other ones.
To do better than that, track how many times we've inlined into
a function. After a fixed number of such inlinings, stop.
Aside from avoding very slow compile times, such infinite
recursion likely is not that beneficial to do a great many times,
so anyhow it is best to stop after a few iterations.
Diffstat (limited to 'src/passes/LocalSubtyping.cpp')
0 files changed, 0 insertions, 0 deletions