[llvm] [CodeGen][Spill2Reg] Initial patch (PR #118832)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 2 04:07:31 PST 2025
================
@@ -2284,6 +2294,52 @@ class TargetInstrInfo : public MCInstrInfo {
llvm_unreachable("unknown number of operands necessary");
}
+ /// \Returns true if a spill/reload of \p Reg can be handled by Spill2Reg.
+ virtual bool isLegalToSpill2Reg(Register Reg, const TargetRegisterInfo *TRI,
+ const MachineRegisterInfo *MRI) const {
+ llvm_unreachable(
+ "Target didn't implement TargetInstrInfo::isLegalToSpill2Reg!");
+ }
----------------
RKSimon wrote:
Why are we putting all of these in here and not TargetRegisterInfo?
https://github.com/llvm/llvm-project/pull/118832
More information about the llvm-commits
mailing list