[llvm] [StackSlotColoring] Ignore non-spill objects in RemoveDeadStores. (PR #80242)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 10:30:35 PST 2024


preames wrote:

> Shouldn't isLoadFromStackSlot fail if the target register is the zero register? I mean, it's technically a load, and the source is a stack slot, but saying it loads a value into x0 is nonsense.
> 
> More generally, looking at the documentation for isLoadFromStackSlot and isStoreToStackSlot, I think they should perform all the checks necessary to make this transform legal.

Craig and I had chatted about this a bit yesterday.  This had been my initial position as well.  However, he pointed out that we had other calls of these routines which check the spill slot frame index property after returning.  So there's definitely room for a cleanup here, but getting a functional fix in as a starting place seemed reasonable.  This approach isn't introducing a new style issue, it's replicating an existing one.  :(


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


More information about the llvm-commits mailing list