@@ -239,23 +239,6 @@ class SchedGroup {
239239 }
240240};
241241
242- // Remove all existing edges from a SCHED_BARRIER or SCHED_GROUP_BARRIER.
243- static void resetEdges (SUnit &SU, ScheduleDAGInstrs *DAG) {
244- assert (SU.getInstr ()->getOpcode () == AMDGPU::SCHED_BARRIER ||
245- SU.getInstr ()->getOpcode () == AMDGPU::SCHED_GROUP_BARRIER ||
246- SU.getInstr ()->getOpcode () == AMDGPU::IGLP_OPT);
247-
248- while (!SU.Preds .empty ())
249- for (auto &P : SU.Preds )
250- SU.removePred (P);
251-
252- while (!SU.Succs .empty ())
253- for (auto &S : SU.Succs )
254- for (auto &SP : S.getSUnit ()->Preds )
255- if (SP.getSUnit () == &SU)
256- S.getSUnit ()->removePred (SP);
257- }
258-
259242using SUToCandSGsPair = std::pair<SUnit *, SmallVector<int , 4 >>;
260243using SUsToCandSGsVec = SmallVector<SUToCandSGsPair, 4 >;
261244
@@ -459,7 +442,6 @@ void PipelineSolver::makePipeline() {
459442 // Command line requested IGroupLP doesn't have SGBarr
460443 if (!SGBarr)
461444 continue ;
462- resetEdges (*SGBarr, DAG);
463445 SG.link (*SGBarr, false );
464446 }
465447 }
@@ -2611,7 +2593,6 @@ void IGroupLPDAGMutation::apply(ScheduleDAGInstrs *DAGInstrs) {
26112593 initSchedGroupBarrierPipelineStage (R);
26122594 FoundSB = true ;
26132595 } else if (Opc == AMDGPU::IGLP_OPT) {
2614- resetEdges (*R, DAG);
26152596 if (!FoundSB && !FoundIGLP) {
26162597 FoundIGLP = true ;
26172598 ShouldApplyIGLP = initIGLPOpt (*R);
@@ -2633,7 +2614,6 @@ void IGroupLPDAGMutation::addSchedBarrierEdges(SUnit &SchedBarrier) {
26332614 assert (MI.getOpcode () == AMDGPU::SCHED_BARRIER);
26342615 // Remove all existing edges from the SCHED_BARRIER that were added due to the
26352616 // instruction having side effects.
2636- resetEdges (SchedBarrier, DAG);
26372617 LLVM_DEBUG (dbgs () << " Building SchedGroup for SchedBarrier with Mask: "
26382618 << MI.getOperand (0 ).getImm () << " \n " );
26392619 auto InvertedMask =
@@ -2691,7 +2671,6 @@ void IGroupLPDAGMutation::initSchedGroupBarrierPipelineStage(
26912671 std::vector<SUnit>::reverse_iterator RIter) {
26922672 // Remove all existing edges from the SCHED_GROUP_BARRIER that were added due
26932673 // to the instruction having side effects.
2694- resetEdges (*RIter, DAG);
26952674 MachineInstr &SGB = *RIter->getInstr ();
26962675 assert (SGB.getOpcode () == AMDGPU::SCHED_GROUP_BARRIER);
26972676 int32_t SGMask = SGB.getOperand (0 ).getImm ();
0 commit comments