[all-commits] [llvm/llvm-project] 83879f: [SimplifyCFG] Don't block sinking for allocas if n...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Mon Aug 19 00:55:53 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 83879f4f5311af334550c54c8279397a8aa33e7b
https://github.com/llvm/llvm-project/commit/83879f4f5311af334550c54c8279397a8aa33e7b
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-08-19 (Mon, 19 Aug 2024)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
M llvm/test/CodeGen/Hexagon/block-addr.ll
M llvm/test/DebugInfo/ARM/single-constant-use-preserves-dbgloc.ll
M llvm/test/Transforms/SimplifyCFG/X86/sink-common-code.ll
M llvm/test/Transforms/SimplifyCFG/sink-and-convert-switch.ll
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list