[PATCH] D158062: [RISCV] Teach RISCVMergeBaseOffset to handle inline asm
Wang Pengcheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 00:28:59 PDT 2023
wangpc marked 4 inline comments as done.
wangpc added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp:462
+ }
+ NewMI->addOperand(UseMI.getOperand(I));
+ NewMI->addOperand(ImmOp);
----------------
craig.topper wrote:
> craig.topper wrote:
> > Can we use MachineOperand::ChangeToGA and MachineOperand::ChangeToMCSymbol to avoid building a new instruction?
> Though I guess we would also need ChangeToCPI for constant pool?
There are four cases of using `RISCVTargetLowering::getAddr`: `GlobalAddress`, `BlockAddress`, `ConstantPool` and `JumpTable`.
`BlockAddress`, `ConstantPool` and `JumpTable` are used in compiler intenelly, so user can't use it in inline asm(?). And there is no corresponding `changeToXXX` methods for them (If they are really needed, I can add them in another patch).
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