[PATCH] D158062: [RISCV] Teach RISCVMergeBaseOffset to handle inline asm
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 23 16:15:29 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp:32
MachineRegisterInfo *MRI;
+ const RISCVInstrInfo *TII;
----------------
This is unused now.
================
Comment at: llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp:405
+ I < UseMI.getNumOperands(); I += 1 + NumOps) {
+ MachineOperand FlagsMO = UseMI.getOperand(I);
+ // Should be an imm.
----------------
Use a const reference
================
Comment at: llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp:417
+
+ auto AddrMO = UseMI.getOperand(I + 1);
+ if (!AddrMO.isReg() || AddrMO.getReg() != DestReg)
----------------
Is this auto making a copy of the operand? If so, we should use a const reference.
================
Comment at: llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp:421
+
+ auto OffsetMO = UseMI.getOperand(I + 2);
+ if (!OffsetMO.isImm())
----------------
Same here
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158062/new/
https://reviews.llvm.org/D158062
More information about the llvm-commits
mailing list