Make AArch64InstrInfo::foldMemoryOperandImpl more general by folding all
full COPYs between register classes of the same size that are either
spilled or refilled.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with one nitpick.
Thanks,
Q.
lib/Target/AArch64/AArch64InstrInfo.cpp | ||
---|---|---|
2645 ↗ | (On Diff #79778) | Could you add a message in the assert please? |
Comment Actions
LGTM as well. Two comments:
lib/Target/AArch64/AArch64InstrInfo.cpp | ||
---|---|---|
2636 ↗ | (On Diff #79778) | I always have a bad feeling about performance when getMinimalPhysRegClass() is used because that function does a linear search through the register classes. However looking around I couldn't find any better way to do what you want to do here. So I'm fine with it for now. |
2645 ↗ | (On Diff #79778) | I would make this an actual check instead of an assert. While I have never seen it in practice, I think in theory we could have implicit defs/uses to the COPY instruction at later positions. |