|
@@ -3726,9 +3726,8 @@ void SwingSchedulerDAG::checkValidNodeOrder(const NodeSetType &Circuits) const {
|
|
|
|
|
|
for (SDep &PredEdge : SU->Preds) {
|
|
|
SUnit *PredSU = PredEdge.getSUnit();
|
|
|
- unsigned PredIndex =
|
|
|
- std::get<1>(*std::lower_bound(Indices.begin(), Indices.end(),
|
|
|
- std::make_pair(PredSU, 0), CompareKey));
|
|
|
+ unsigned PredIndex = std::get<1>(
|
|
|
+ *llvm::lower_bound(Indices, std::make_pair(PredSU, 0), CompareKey));
|
|
|
if (!PredSU->getInstr()->isPHI() && PredIndex < Index) {
|
|
|
PredBefore = true;
|
|
|
Pred = PredSU;
|
|
@@ -3743,9 +3742,8 @@ void SwingSchedulerDAG::checkValidNodeOrder(const NodeSetType &Circuits) const {
|
|
|
// return Indices.end().
|
|
|
if (SuccSU->isBoundaryNode())
|
|
|
continue;
|
|
|
- unsigned SuccIndex =
|
|
|
- std::get<1>(*std::lower_bound(Indices.begin(), Indices.end(),
|
|
|
- std::make_pair(SuccSU, 0), CompareKey));
|
|
|
+ unsigned SuccIndex = std::get<1>(
|
|
|
+ *llvm::lower_bound(Indices, std::make_pair(SuccSU, 0), CompareKey));
|
|
|
if (!SuccSU->getInstr()->isPHI() && SuccIndex < Index) {
|
|
|
SuccBefore = true;
|
|
|
Succ = SuccSU;
|
|
@@ -3756,9 +3754,8 @@ void SwingSchedulerDAG::checkValidNodeOrder(const NodeSetType &Circuits) const {
|
|
|
if (PredBefore && SuccBefore && !SU->getInstr()->isPHI()) {
|
|
|
// instructions in circuits are allowed to be scheduled
|
|
|
// after both a successor and predecessor.
|
|
|
- bool InCircuit = std::any_of(
|
|
|
- Circuits.begin(), Circuits.end(),
|
|
|
- [SU](const NodeSet &Circuit) { return Circuit.count(SU); });
|
|
|
+ bool InCircuit = llvm::any_of(
|
|
|
+ Circuits, [SU](const NodeSet &Circuit) { return Circuit.count(SU); });
|
|
|
if (InCircuit)
|
|
|
LLVM_DEBUG(dbgs() << "In a circuit, predecessor ";);
|
|
|
else {
|