Skip to content

Commit f0e1625

Browse files
committed
fixup! [MachinePipeliner] Add an abstract layer to manipulate Data Dependence Graph
1 parent 65c5f46 commit f0e1625

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

llvm/lib/CodeGen/MachinePipeliner.cpp

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,8 +1609,12 @@ void SwingSchedulerDAG::Circuits::createAdjacencyStructure(
16091609
if (OE.getDst()->isBoundaryNode() || OE.isArtificial())
16101610
continue;
16111611

1612-
// To preserve previous behavior and prevent regression
1613-
// FIXME: Remove if this doesn't have significant impact on performance
1612+
// This code is retained o preserve previous behavior and prevent
1613+
// regression. This condition means that anti-dependnecies within an
1614+
// iteration are ignored when searching circuits. Therefore it's natural
1615+
// to consider this dependence as well.
1616+
// FIXME: Remove this code if it doesn't have significant impact on
1617+
// performance.
16141618
if (OE.isAntiDep())
16151619
continue;
16161620

@@ -1888,8 +1892,10 @@ static bool pred_L(SetVector<SUnit *> &NodeOrder,
18881892
Preds.insert(PredSU);
18891893
}
18901894

1891-
// To preserve previous behavior and prevent regression
1892-
// FIXME: Remove if this doesn't have significant impact on performance
1895+
// FIXME: The following loop-carried dependencies may also need to be
1896+
// considered.
1897+
// - Physical register dependnecies (true-dependnece and WAW).
1898+
// - Memory dependencies.
18931899
for (const auto &OE : DDG->getOutEdges(SU)) {
18941900
SUnit *SuccSU = OE.getDst();
18951901
if (!OE.isAntiDep())
@@ -1922,8 +1928,10 @@ static bool succ_L(SetVector<SUnit *> &NodeOrder,
19221928
Succs.insert(SuccSU);
19231929
}
19241930

1925-
// To preserve previous behavior and prevent regression
1926-
// FIXME: Remove if this doesn't have significant impact on performance
1931+
// FIXME: The following loop-carried dependencies may also need to be
1932+
// considered.
1933+
// - Physical register dependnecies (true-dependnece and WAW).
1934+
// - Memory dependencies.
19271935
for (const auto &IE : DDG->getInEdges(SU)) {
19281936
SUnit *PredSU = IE.getSrc();
19291937
if (!IE.isAntiDep())
@@ -2304,9 +2312,10 @@ void SwingSchedulerDAG::computeNodeOrder(NodeSetType &NodeSets) {
23042312
R.insert(SU);
23052313
}
23062314

2307-
// To preserve previous behavior and prevent regression
2308-
// FIXME: Remove if this doesn't have significant impact on
2309-
// performance
2315+
// FIXME: The following loop-carried dependencies may also need to be
2316+
// considered.
2317+
// - Physical register dependnecies (true-dependnece and WAW).
2318+
// - Memory dependencies.
23102319
for (const auto &IE : DDG->getInEdges(maxHeight)) {
23112320
SUnit *SU = IE.getSrc();
23122321
if (!IE.isAntiDep())
@@ -2358,9 +2367,10 @@ void SwingSchedulerDAG::computeNodeOrder(NodeSetType &NodeSets) {
23582367
R.insert(SU);
23592368
}
23602369

2361-
// To preserve previous behavior and prevent regression
2362-
// FIXME: Remove if this doesn't have significant impact on
2363-
// performance
2370+
// FIXME: The following loop-carried dependencies may also need to be
2371+
// considered.
2372+
// - Physical register dependnecies (true-dependnece and WAW).
2373+
// - Memory dependencies.
23642374
for (const auto &OE : DDG->getOutEdges(maxDepth)) {
23652375
SUnit *SU = OE.getDst();
23662376
if (!OE.isAntiDep())

0 commit comments

Comments
 (0)