[PATCH] D152706: [AMDGPU] Use SSAUpdater in PromoteAlloca
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 00:18:31 PDT 2023
Pierre-vh marked 2 inline comments as done.
Pierre-vh added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:557-559
+ // Sort the worklist by dominance so we can use SSAUpdater.
+ sort(WorkList,
+ [&](Instruction *A, Instruction *B) { return DT.dominates(A, B); });
----------------
arsenm wrote:
> I don't understand why you would need to do this. You aren't moving any instructions around, so the dominance properties should be implied by the original values.
If I don't sort by dominance, I have multiples crashes in `promote-alloca-array-aggregate.ll`. It seems mostly related to memcpy though, hence why I put a TODO saying the lowering may be incorrect. I'm still not sure why.
I agree that requiring the DT for this is annoying, I'll try to think of ways to avoid it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152706/new/
https://reviews.llvm.org/D152706
More information about the llvm-commits
mailing list