[llvm] [TII][NFC] Add renamable bit to copyPhysReg (PR #91179)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 07:02:28 PDT 2024
================
@@ -993,10 +993,16 @@ class TargetInstrInfo : public MCInstrInfo {
/// The source and destination registers may overlap, which may require a
/// careful implementation when multiple copy instructions are required for
/// large registers. See for example the ARM target.
+ ///
+ /// If RenamableDest is true, the copy instruction's destination operand is
+ /// marked renamable.
+ /// If RenamableSrc is true, the copy instruction's source operand is
+ /// marked renamable.
virtual void copyPhysReg(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI, const DebugLoc &DL,
- MCRegister DestReg, MCRegister SrcReg,
- bool KillSrc) const {
+ MCRegister DestReg, MCRegister SrcReg, bool KillSrc,
+ bool RenamableDest = false,
+ bool RenamableSrc = false) const {
----------------
jayfoad wrote:
> you should be able to use this without an existing COPY instruction
In that case you can create standalone MachineOperands to pass the information into copyPhysReg. I'm just suggesting this as a bit of a hack, because MachineOperand currently does not store its flags in such a way that they can easily be copied in/out of operands and passed around in APIs.
https://github.com/llvm/llvm-project/pull/91179
More information about the llvm-commits
mailing list