aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2024-02-13 13:43:21 -0800
committerGitHub <noreply@github.com>2024-02-13 13:43:21 -0800
commit473ef10b0fc93eeb2cbb3b2cf2f1b748eac6ddd9 (patch)
treefc67ff7c37d6a96d2260e10bbadc000ccf510925 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
parent8c56e78ec531f0e2460213c20fff869b6b7add99 (diff)
downloadllvm-473ef10b0fc93eeb2cbb3b2cf2f1b748eac6ddd9.zip
llvm-473ef10b0fc93eeb2cbb3b2cf2f1b748eac6ddd9.tar.gz
llvm-473ef10b0fc93eeb2cbb3b2cf2f1b748eac6ddd9.tar.bz2
[WebAssembly] Demote PHIs in catchswitch BB only (#81570)
`DemoteCatchSwitchPHIOnly` option in `WinEHPrepare` pass was added in https://github.com/llvm/llvm-project/commit/99d60e0dabcf20f4db683da83cde905b7a1373de, because Wasm EH uses `WinEHPrepare`, but it doesn't need to demote all PHIs. PHIs in `catchswitch` BBs have to be removed (= demoted) because `catchswitch`s are removed in ISel and `catchswitch` BBs are removed as well, so they can't have other instructions. But because Wasm EH doesn't use funclets, so PHIs in `catchpad` or `cleanuppad` BBs don't need to be demoted. That was the reason `DemoteCatchSwitchPHIOnly` option was added, in order not to demote more instructions unnecessarily. The problem is it should have been set to `true` for Wasm EH. (Its default value is `false` for WinEH) And I mistakenly set it to `false` and wasn't aware about this for more than 5 years. This was not the end of the world; it just means we've been demoting more instructions than we should, possibly huting code size. In practice I think it would've had hardly any effect in real performance given that the occurrence of PHIs in `catchpad` or `cleanuppad` BBs are not very frequent and many people run other optimizers like Binaryen anyway.
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions