[llvm] [MachineScheduler] Improve handling of phys regs in GenericScheduler() (NFC). (PR #187572)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 13:09:37 PDT 2026


================
@@ -1648,6 +1648,10 @@ class LLVM_ABI TargetInstrInfo : public MCInstrInfo {
     llvm_unreachable("target did not implement shouldClusterMemOps()");
   }
 
+  // GenericScheduler: Handle non COPY/immLoad physreg defs, and maintain
+  // input order if both are biased same way.
+  virtual bool biasPRegsExtra() const { return false; }
----------------
mshockwave wrote:

Reading this again, I also feel like TII hook is not a good fit for this case.

> but would however (most likely) need to be set to the same value every time a region was scheduled.

I think that's fine. Other flags like `OnlyTopDown` might already do that (i.e. setting to the same value) anyway.

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


More information about the llvm-commits mailing list