|
22 | 22 | #include "llvm/CodeGen/GlobalISel/InstructionSelector.h" |
23 | 23 | #include "llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h" |
24 | 24 | #include "llvm/CodeGen/GlobalISel/MIPatternMatch.h" |
| 25 | +#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h" |
| 26 | +#include "llvm/CodeGen/MachineFrameInfo.h" |
25 | 27 | #include "llvm/CodeGen/MachineJumpTableInfo.h" |
26 | 28 | #include "llvm/Support/Debug.h" |
27 | 29 |
|
@@ -810,8 +812,8 @@ bool Z80InstructionSelector::selectLoadStore(MachineInstr &I, |
810 | 812 | } |
811 | 813 | } |
812 | 814 |
|
813 | | - I.RemoveOperand(1); |
814 | | - I.RemoveOperand(0); |
| 815 | + I.removeOperand(1); |
| 816 | + I.removeOperand(0); |
815 | 817 | MachineInstrBuilder MIB(MF, I); |
816 | 818 | SmallVector<MachineOperand, 2> MOs; |
817 | 819 | int32_t Off = 0; |
@@ -976,7 +978,7 @@ bool Z80InstructionSelector::selectLoadStore(MachineInstr &I, |
976 | 978 | MachineInstr &LoadMI = *MemMOs[1]; |
977 | 979 | LoadMI.setDesc(TII.get(TargetOpcode::IMPLICIT_DEF)); |
978 | 980 | while (LoadMI.getNumOperands() > 1) |
979 | | - LoadMI.RemoveOperand(1); |
| 981 | + LoadMI.removeOperand(1); |
980 | 982 | LoadMI.dropMemRefs(MF); |
981 | 983 | } |
982 | 984 | } |
@@ -1012,7 +1014,7 @@ bool Z80InstructionSelector::selectFrameIndexOrGep(MachineInstr &I, |
1012 | 1014 | if (I.getOpcode() == TargetOpcode::G_PTR_ADD) { |
1013 | 1015 | auto OffConst = getIConstantVRegVal(I.getOperand(2).getReg(), MRI); |
1014 | 1016 | if (OffConst && OffConst->sge(-1) && OffConst->sle(1)) { |
1015 | | - I.RemoveOperand(2); |
| 1017 | + I.removeOperand(2); |
1016 | 1018 | if (OffConst->isNullValue()) { |
1017 | 1019 | I.setDesc(TII.get(TargetOpcode::COPY)); |
1018 | 1020 | return selectCopy(I, MRI); |
|
0 commit comments