Skip to content

Commit 818bbec

Browse files
committed
Fix Some Comments + Restore Old Adjacency Matrix
1 parent 8cd35a2 commit 818bbec

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

llvm/include/llvm/CodeGen/MachinePipeliner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ class NodeSet {
373373
}
374374
}
375375
}
376-
// Handle a back-edge between a store and a load
376+
// Handle a back-edge in loop carried dependencies
377377
SUnit *FirstNode = Nodes[0];
378378
SUnit *LastNode = Nodes[Nodes.size() - 1];
379379

llvm/lib/CodeGen/MachinePipeliner.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,19 +1680,13 @@ void SwingSchedulerDAG::Circuits::createAdjacencyStructure(
16801680
Added.set(N);
16811681
}
16821682
}
1683-
// Order edges of the following:
1684-
// 1. Load -> Store
1685-
// 2. Store -> Load
1686-
// are treated as a back-edge in the adjacency matrix.
1687-
// Store after store was handled above.
1683+
// A chain edge between a store and a load is treated as a back-edge in the
1684+
// adjacency matrix.
16881685
for (auto &PI : SUnits[i].Preds) {
1689-
if (PI.getKind() != SDep::Order ||
1686+
if (!SUnits[i].getInstr()->mayStore() ||
16901687
!DAG->isLoopCarriedDep(&SUnits[i], PI, false))
16911688
continue;
1692-
if ((SUnits[i].getInstr()->mayLoad() &&
1693-
PI.getSUnit()->getInstr()->mayStore()) ||
1694-
(SUnits[i].getInstr()->mayStore() &&
1695-
PI.getSUnit()->getInstr()->mayLoad())) {
1689+
if (PI.getKind() == SDep::Order && PI.getSUnit()->getInstr()->mayLoad()) {
16961690
int N = PI.getSUnit()->NodeNum;
16971691
if (!Added.test(N)) {
16981692
AdjK[i].push_back(N);

llvm/test/CodeGen/PowerPC/sms-recmii.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
1+
; REQUIRES: asserts
22
; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs\
33
; RUN: -mcpu=pwr9 --ppc-enable-pipeliner --debug-only=pipeliner 2>&1 | FileCheck %s
44

0 commit comments

Comments
 (0)