[llvm] [AMDGPU] Optionally Use GCNRPTrackers during scheduling (PR #93090)
Jeffrey Byrnes via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 15:08:18 PDT 2024
================
@@ -357,6 +393,16 @@ SUnit *GCNSchedStrategy::pickNode(bool &IsTopNode) {
return SU;
}
+void GCNSchedStrategy::schedNode(SUnit *SU, bool IsTopNode) {
+ if (GCNTrackers) {
+ MachineInstr *MI = SU->getInstr();
+ IsTopNode ? (void)DownwardTracker.advance(MI, false, DAG->getLIS())
+ : UpwardTracker.recede(*MI, false);
----------------
jrbyrnes wrote:
For the UpwardTracker, it is probably fine, but there will be issues with the DownwardTracker.
`ShouldTrackIt` is probably a misnomer and should be named to `UseInternalIterator`.
I don't think we can use the current version of the DownwardRPTracker for either use case. When scheduling a node, we have an issue with `advanceToNext`. It assumes that we can just advance the NextMI iterator to get the next instruction. This is only true if we have already scheduled the NextMI and updated the iterators, but we can't have scheduled the next instruction because we are in the process of scheduling the current instruction.
Do you see it differently?
https://github.com/llvm/llvm-project/pull/93090
More information about the llvm-commits
mailing list