@@ -1609,8 +1609,12 @@ void SwingSchedulerDAG::Circuits::createAdjacencyStructure(
1609
1609
if (OE.getDst ()->isBoundaryNode () || OE.isArtificial ())
1610
1610
continue ;
1611
1611
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.
1614
1618
if (OE.isAntiDep ())
1615
1619
continue ;
1616
1620
@@ -1888,8 +1892,10 @@ static bool pred_L(SetVector<SUnit *> &NodeOrder,
1888
1892
Preds.insert (PredSU);
1889
1893
}
1890
1894
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.
1893
1899
for (const auto &OE : DDG->getOutEdges (SU)) {
1894
1900
SUnit *SuccSU = OE.getDst ();
1895
1901
if (!OE.isAntiDep ())
@@ -1922,8 +1928,10 @@ static bool succ_L(SetVector<SUnit *> &NodeOrder,
1922
1928
Succs.insert (SuccSU);
1923
1929
}
1924
1930
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.
1927
1935
for (const auto &IE : DDG->getInEdges (SU)) {
1928
1936
SUnit *PredSU = IE.getSrc ();
1929
1937
if (!IE.isAntiDep ())
@@ -2304,9 +2312,10 @@ void SwingSchedulerDAG::computeNodeOrder(NodeSetType &NodeSets) {
2304
2312
R.insert (SU);
2305
2313
}
2306
2314
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.
2310
2319
for (const auto &IE : DDG->getInEdges (maxHeight)) {
2311
2320
SUnit *SU = IE.getSrc ();
2312
2321
if (!IE.isAntiDep ())
@@ -2358,9 +2367,10 @@ void SwingSchedulerDAG::computeNodeOrder(NodeSetType &NodeSets) {
2358
2367
R.insert (SU);
2359
2368
}
2360
2369
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.
2364
2374
for (const auto &OE : DDG->getOutEdges (maxDepth)) {
2365
2375
SUnit *SU = OE.getDst ();
2366
2376
if (!OE.isAntiDep ())
0 commit comments