[llvm] [llvm][CodeGen] Add a new software pipeliner 'Window Scheduler' (PR #84443)
Hua Tian via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 23:34:34 PDT 2024
================
@@ -292,8 +304,11 @@ bool MachinePipeliner::scheduleLoop(MachineLoop &L) {
}
++NumTrytoPipeline;
+ if (useSwingModuloScheduler())
+ Changed = swingModuloScheduler(L);
- Changed = swingModuloScheduler(L);
+ if (useWindowScheduler(Changed))
+ Changed = runWindowScheduler(L);
----------------
huaatian wrote:
Thank you very much for your review comment. Let me explain the current design considerations:
1. We understand that both SMS (Swing Modulo Scheduling) and WS (Window Scheduling) belong to the category of software pipelining algorithms, and the conditions for determining their feasibility are the same. To avoid redundant checks, we have placed both in the MachinePipeliner.
2. The basic principle of both SMS and WS scheduling is to fold the loop multiple times to obtain the kernel. The advantage of SMS is that it can fold more times, i.e., the stage can be greater than 2. On the other hand, the advantage of WS is that it is less affected by resource conflicts and can always get a scheduling result. Therefore, performing WS after SMS fails can be seen as an enhanced algorithm for targets with many resource conflicts.
I hope my explanation addresses your concerns. Thank you!
https://github.com/llvm/llvm-project/pull/84443
More information about the llvm-commits
mailing list