[llvm] [SROA] Optimize reloaded values in allocas that escape into readonly nocapture calls. (PR #116645)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 28 00:40:08 PST 2024
davemgreen wrote:
> I think the correct way to handle this is to call AddAvailableValue for the entry block with an UndefValue.
Yeah I was hoping that would work. The last commit in this PR has that (but backwards, where it was taken out, a306a3f56b7162587002e91d1d5852f6457630bd). I believe that defines the values at the end of the block, so the value is still converted to poison if it is all in one block. I can maybe add something into LoadAndStorePromoter - the part that understands about values throughout a block - to treat the alloca like a store that defines a value.
https://github.com/llvm/llvm-project/pull/116645
More information about the llvm-commits
mailing list