aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-08-19 09:55:30 +0200
committerGitHub <noreply@github.com>2024-08-19 09:55:30 +0200
commit83879f4f5311af334550c54c8279397a8aa33e7b (patch)
treea15977b9aa9419d24811bb055ccfab67ee34b70e /clang/lib/CodeGen
parent985d64b03accbed8500a85372d716367d89b61be (diff)
downloadllvm-83879f4f5311af334550c54c8279397a8aa33e7b.zip
llvm-83879f4f5311af334550c54c8279397a8aa33e7b.tar.gz
llvm-83879f4f5311af334550c54c8279397a8aa33e7b.tar.bz2
[SimplifyCFG] Don't block sinking for allocas if no phi created (#104579)
SimplifyCFG sinking currently does not sink loads/stores of allocas, because historically SROA was unable to handle the resulting IR. Since then, SROA both learned to speculate loads/stores over selects and phis, *and* SimplifyCFG sinking has been deferred to the end of the function simplification pipeline, which means that SROA happens before it. As such, I believe that this workaround should no longer be necessary. Given how sensitive SimplifyCFG sinking seems to be, this patch takes a very conservative step towards removing this, by allowing sinking if we don't actually need to form a phi over the pointer argument. This fixes https://github.com/llvm/llvm-project/issues/104567, where sinking a store to an escaped alloca allows converting a switch into arithmetic.
Diffstat (limited to 'clang/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions