[PATCH] D16829: An implementation of Swing Modulo Scheduling
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 07:29:42 PDT 2016
sebpop added a subscriber: sebpop.
================
Comment at: lib/CodeGen/MachinePipeliner.cpp:2222
@@ +2221,3 @@
+ generatePhis(KernelBB, PrologBBs.back(), KernelBB, KernelBB, Schedule, VRMap,
+ InstrMap, MaxStageCount, MaxStageCount, false);
+
----------------
Both generateExistingPhis and generatePhis are passed the same parameters. Can we have this code factored up in a class: that would allow to split these two functions into smaller functions easier to follow.
================
Comment at: lib/CodeGen/MachinePipeliner.cpp:2508
@@ +2507,3 @@
+ // value. Otherwise, use the scheduled version of the instruction. This
+ // is a little complicated when a Phi references another Phi.
+ if (np > PrologStage || StageScheduled >= (int)LastStageNum)
----------------
Could we have the code of this loop split up into smaller functions?
================
Comment at: lib/CodeGen/MachinePipeliner.cpp:2513
@@ +2512,3 @@
+ else if (PrologStage >= AccessStage + StageDiff + np &&
+ VRMap[PrologStage - StageDiff - np].count(LoopVal) != 0)
+ PhiOp1 = VRMap[PrologStage - StageDiff - np][LoopVal];
----------------
I find the indexing in VRMap to be difficult to follow: could we have the arithmetic hidden behind some set/get interface for the prolog/epilog?
http://reviews.llvm.org/D16829
More information about the llvm-commits
mailing list