[llvm] [MISched] Extend overridePostRASchedPolicy to support per-function scheduling direction (PR #149297)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 17 09:34:50 PDT 2025


https://github.com/mshockwave commented:

though I'm not sure how many people is using it (downstream), but I don't think `NumRegionInstrs` can be easily calculated from MachineFunction. Plus, fundamentally this API is called per region rather than per function, so I'm wondering if we can pass in [`SchedRegion`](https://github.com/llvm/llvm-project/blob/661cbd5a5254de22ba87a49e89f54b30e2874fb3/llvm/lib/CodeGen/MachineScheduler.cpp#L776) instead, which has both the MachineInstr iterators and number of instructions in the region (you have to make `SchedRegion` public, of course)

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


More information about the llvm-commits mailing list