================
@@ -1296,3 +1296,13 @@ bool X86RegisterInfo::isNonRex2RegClass(const
TargetRegisterClass *RC) const {
return true;
}
}
+
+unsigned X86RegisterInfo::getCSRFirstUseCost(const MachineFunction &MF) const {
+ // If PPX is implemented, push/pop pairs don't access memory.
+ const X86Subtarget &ST = MF.getSubtarget<X86Subtarget>();
+ if (ST.is64Bit() && ST.hasPPX())
+ return 0;
+
+ // push + pop.
----------------
david-xl wrote:
what I meant is to also introduce another option regalloc-csr-first-use-cost.
https://github.com/llvm/llvm-project/pull/220090
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits