Allows allocas with memset users to be promoted.
This is intended to prevent patterns such as memset(&alloca, 0, sizeof(alloca)) (which I think can be emitted by frontends) from preventing a vectorization of allocas.
Fixes SWDEV-388784
Differential D146225
[AMDGPU] Handle memset users in PromoteAlloca Pierre-vh on Mar 16 2023, 6:35 AM. Authored by
Details Allows allocas with memset users to be promoted. This is intended to prevent patterns such as memset(&alloca, 0, sizeof(alloca)) (which I think can be emitted by frontends) from preventing a vectorization of allocas. Fixes SWDEV-388784
Diff Detail
Event Timeline
Comment Actions @lebedev.ri had some patches to do a much less aggressive vector formation during SROA
Comment Actions (Unrelated to the review) do you have a link to those patches? I was planning to do some PromoteAlloca improvements later but if we're planning to merge it with SROA later then I suppose time would be better spent moving in that direction and helping these patches land
Comment Actions Comments
|
I'd expect the input to be the MemSetInst and the dyn_cast would be on the caller side. Also, use TypeSize?