We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce2c4ea commit 6ecc1ffCopy full SHA for 6ecc1ff
llvm/include/llvm/CodeGen/MachinePipeliner.h
@@ -486,8 +486,9 @@ class NodeSet {
486
if (PI.getSrc() != FirstNode || !PI.isOrderDep() ||
487
!DAG->isLoopCarriedDep(PI))
488
continue;
489
- SUnitToDistance[FirstNode] =
490
- std::max(SUnitToDistance[FirstNode], SUnitToDistance[LastNode] + 1);
+ unsigned &First = SUnitToDistance[FirstNode];
+ unsigned Last = SUnitToDistance[LastNode];
491
+ First = std::max(First, Last + 1);
492
}
493
494
// The latency is the distance from the source node to itself.
0 commit comments