[PATCH] D60864: [AMDGPU] Ignore non-SUnits edges
Piotr Sobczak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 04:28:11 PDT 2019
piotr created this revision.
Herald added subscribers: llvm-commits, javed.absar, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl, arsenm, MatzeB.
Herald added a project: LLVM.
piotr added a reviewer: nhaehnle.
Ignore edges to non-SUnits (e.g. ExitSU) when checking
for low latency instructions.
When calling the function isLowLatencyInstruction(),
an ExitSU could be on the list of successors, not necessarily
a regular SU. In other places in the code there is a check
"Succ->NodeNum >= DAGSize" to prevent further processing of
ExitSU as "Succ->getInstr()" is NULL in such a case.
Also, 8 out of 9 cases of "SUnit *Succ = SuccDep.getSUnit())"
has the guard, so it is clearly an omission here.
Change-Id: Ica86f0327c7b2e6bcb56958e804ea6c71084663b
Repository:
rL LLVM
https://reviews.llvm.org/D60864
Files:
lib/Target/AMDGPU/SIMachineScheduler.cpp
Index: lib/Target/AMDGPU/SIMachineScheduler.cpp
===================================================================
--- lib/Target/AMDGPU/SIMachineScheduler.cpp
+++ lib/Target/AMDGPU/SIMachineScheduler.cpp
@@ -1874,6 +1874,8 @@
bool CopyForLowLat = false;
for (SDep& SuccDep : SU->Succs) {
SUnit *Succ = SuccDep.getSUnit();
+ if (SuccDep.isWeak() || Succ->NodeNum >= DAGSize)
+ continue;
if (SITII->isLowLatencyInstruction(*Succ->getInstr())) {
CopyForLowLat = true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60864.195714.patch
Type: text/x-patch
Size: 537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190418/67171188/attachment.bin>
More information about the llvm-commits
mailing list