[llvm] [StackSlotColoring] Ignore non-spill objects in RemoveDeadStores. (PR #80242)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 1 11:22:36 PST 2024
efriedma-quic wrote:
So I think we have the following points:
- isLoadFromStackSlot doesn't make sense for volatile loads.
- Returning loads targeting a zero register from isLoadFromStackSlot is bad. This is unlikely to be relevant for non-volatile loads.
- The transform here is not intended to be a general DSE transform, so it should be specifically targeting spill slots. This fixes the issue because accesses to spill slots can't be volatile.
So there's a bunch of overlapping ways to constrain the transform that fix the issue.
I'm not against taking this fix as-is, but I also don't really want to leave isLoadFromStackSlot in its current state because it's sort of a trap.
> Worth noting is that no other target has the frame index restriction inside the isLoadFromStackSlot routine either.
What restriction are you talking about? Every target checks that for a frame index operand: the routine returns a frame index. As far as I can tell, no target checks any properties of that frame index. (The AArch64 thing about not targeting xzr mentioned in the issue is not about isLoadFromStackSlot itself.)
https://github.com/llvm/llvm-project/pull/80242
More information about the llvm-commits
mailing list