diff options
author | Thomas Lively <tlively@google.com> | 2024-11-13 19:33:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-13 16:33:18 -0800 |
commit | 9002cc6f87570afdcb000760f54abdad6861f1bd (patch) | |
tree | 4da7435643b3dcdcf8eea73fe7347c165aaa4b31 /src/support/safe_integer.cpp | |
parent | 24c81824c1d80c398c6adb27decc28048c5e8029 (diff) | |
download | binaryen-9002cc6f87570afdcb000760f54abdad6861f1bd.tar.gz binaryen-9002cc6f87570afdcb000760f54abdad6861f1bd.tar.bz2 binaryen-9002cc6f87570afdcb000760f54abdad6861f1bd.zip |
Fixup pops when necessary in IRBuilder (#7075)
IRBuilder introduces scratch locals to hoist values from underneath
stacky code to the top of the stack for consumption by the next
instruction. When it does so, the sequence of instructions from the set
to the get of the scratch local is packaged in a block so the entire
sequence can be made a child of the next instruction. In cases where the
hoisted value comes from a `pop`, this packaging can make the IR
invalid, since `pop`s are not allowed to appear inside blocks.
Detect when this problem might occur and fix it by running
`EHUtils::handleBlockNestedPops` after the function containing the
problem has been constructed.
Diffstat (limited to 'src/support/safe_integer.cpp')
0 files changed, 0 insertions, 0 deletions