[llvm] [AArch64][DebugInfo]Add Target hooks for InstrRef on AArch64 (PR #165953)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 5 10:31:52 PST 2025
================
@@ -2429,14 +2433,56 @@ Register AArch64InstrInfo::isStoreToStackSlot(const MachineInstr &MI,
case AArch64::STRDui:
case AArch64::STRQui:
case AArch64::STR_PXI:
- if (MI.getOperand(0).getSubReg() == 0 && MI.getOperand(1).isFI() &&
- MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0) {
- FrameIndex = MI.getOperand(1).getIndex();
- return MI.getOperand(0).getReg();
- }
- break;
+ return true;
}
- return 0;
+}
+
+Register AArch64InstrInfo::isStoreToStackSlot(const MachineInstr &MI,
+ int &FrameIndex) const {
+ if (!isFrameStoreOpcode(MI.getOpcode()))
+ return Register();
+
+ if (MI.getOperand(0).getSubReg() == 0 && MI.getOperand(1).isFI() &&
+ MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0) {
+ FrameIndex = MI.getOperand(1).getIndex();
+ return MI.getOperand(0).getReg();
+ }
+ return Register();
+}
+
+Register AArch64InstrInfo::isStoreToStackSlotPostFE(const MachineInstr &MI,
+ int &FrameIndex) const {
+ if (!isFrameStoreOpcode(MI.getOpcode()))
+ return Register();
+
+ SmallVector<const MachineMemOperand *, 1> Accesses;
----------------
davemgreen wrote:
Move Accesses below isStoreToStackSlot? So that it is closer to the first use.
https://github.com/llvm/llvm-project/pull/165953
More information about the llvm-commits
mailing list