[clang] [llvm] [RegAlloc] [X86] Enable callee saved register optimization for x86 (PR #188609)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 8 15:45:53 PDT 2026


================
@@ -182,6 +182,11 @@ class X86RegisterInfo final : public X86GenRegisterInfo {
   bool requiresRegisterScavenging(const MachineFunction &MF) const override {
     return true;
   }
+
+  unsigned getCSRFirstUseCost() const override {
+    // push + pop.
+    return 2;
----------------
weiguozhi wrote:

Good  catch, skip this optimization for PPX now.

https://github.com/llvm/llvm-project/pull/188609


More information about the cfe-commits mailing list