[llvm] [llvm][CodeGen] Add a new software pipeliner 'Window Scheduler' (PR #84443)

Hua Tian via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 04:40:38 PDT 2024


================
@@ -484,9 +499,35 @@ void MachinePipeliner::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.addRequired<MachineDominatorTree>();
   AU.addRequired<LiveIntervals>();
   AU.addRequired<MachineOptimizationRemarkEmitterPass>();
+  AU.addRequired<TargetPassConfig>();
   MachineFunctionPass::getAnalysisUsage(AU);
 }
 
+bool MachinePipeliner::runWindowScheduler(MachineLoop &L) {
+  MachineSchedContext Context;
+  Context.MF = MF;
+  Context.MLI = MLI;
+  Context.MDT = MDT;
+  Context.PassConfig = &getAnalysis<TargetPassConfig>();
----------------
huaatian wrote:

In the WindowScheduler, we use createMachineScheduler() through 'PassConfig' to call the target's custom MachineScheduler:
<img width="661" alt="image" src="https://github.com/llvm/llvm-project/assets/142874007/ed685e0b-2542-4001-81b4-5acbda9948cb">


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


More information about the llvm-commits mailing list