[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:50:22 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:

Additionally, two ScheduleDAGs are used here: one for analyzing the dependencies between all instructions after copying, and the other for scheduling instructions in the window. The difference is that the former does not need to consider register pressure.

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


More information about the llvm-commits mailing list