Original patch (50b2a113db197a97f60ad2aace8b7382dc9b8c31) ignored the
fact that -ftrivial-auto-var-init could affect function parameters with
the sret attribute.
Just do not move instruction that don't affect alloca.
Also add missing test case for volatile instruction.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Utils/MoveAutoInit.cpp | ||
---|---|---|
56 | Return MemoryLocation from this function and don't repeat the same in usersDominator? I'd also replace stripInBoundsConstantsOffsets with getUnderlyingObject here. Unlikely to matter for auto-init in particular, but it's logically the right function. |
Return MemoryLocation from this function and don't repeat the same in usersDominator?
I'd also replace stripInBoundsConstantsOffsets with getUnderlyingObject here. Unlikely to matter for auto-init in particular, but it's logically the right function.