-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[TII][RISCV] Add renamable bit to copyPhysReg #91179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1018,10 +1018,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 { | ||
Comment on lines
+1028
to
+1030
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we just start passing through a SrcFlags/DestFlags instead of unpacking them into kill/renamable? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or pass in actual There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think passing in MachineOperands would be wrong, you should be able to use this without an existing COPY instruction There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Agree! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having to construct temporary operands would be worse than just having a bool flag for every bit. They're not exactly free to allocate |
||
llvm_unreachable("Target didn't implement TargetInstrInfo::copyPhysReg!"); | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.