[llvm] [SROA] Optimize reloaded values in allocas that escape into readonly nocapture calls. (PR #116645)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 07:35:05 PST 2024


nikic wrote:

> The issues I found with SSAUpdater was that it loves to turn loads into poison, which is not generally valid for allocas. I've added an option to turn those values in zero instead, let me know if there is a better suggestion.

I think the correct way to handle this is to call `AddAvailableValue` for the entry block with an UndefValue.

https://github.com/llvm/llvm-project/pull/116645


More information about the llvm-commits mailing list