[llvm] [MachinePipeliner] Add an abstract layer to manipulate Data Dependenc… (PR #109918)
Ryotaro Kasuga via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 28 23:31:32 PST 2024
================
@@ -1675,24 +1653,33 @@ void SwingSchedulerDAG::Circuits::createAdjacencyStructure(
OutputDeps[N] = BackEdge;
}
// Do not process a boundary node, an artificial node.
- // A back-edge is processed only if it goes to a Phi.
- if (SI.getSUnit()->isBoundaryNode() || SI.isArtificial() ||
- (SI.getKind() == SDep::Anti && !SI.getSUnit()->getInstr()->isPHI()))
+ if (OE.getDst()->isBoundaryNode() || OE.isArtificial())
+ continue;
+
+ // This code is retained o preserve previous behavior and prevent
+ // regression. This condition means that anti-dependnecies within an
+ // iteration are ignored when searching circuits. Therefore it's natural
+ // to consider this dependence as well.
+ // FIXME: Remove this code if it doesn't have significant impact on
+ // performance.
+ if (OE.isAntiDep())
----------------
kasuga-fj wrote:
I don't think it is necessary. Dependencies marked as Anti and going into PHI are converted to Data in the `SwingSchedulerDDGEdge` ctor.
https://github.com/llvm/llvm-project/pull/109918
More information about the llvm-commits
mailing list