Skip to content

Commit 46533e6

Browse files
committed
MachineScheduler: Remove ineffective heuristic; NFC
Currently all nodes get added to the NextSU list when they are released, so any candidate must be in that list, making the heuristic ineffective. Remove it for now, we can add it back later in a working fashion if necessary. llvm-svn: 282200
1 parent c7957ef commit 46533e6

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

llvm/include/llvm/CodeGen/MachineScheduler.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -589,10 +589,6 @@ class SchedBoundary {
589589
/// instruction.
590590
bool CheckPending;
591591

592-
// For heuristics, keep a list of the nodes that immediately depend on the
593-
// most recently scheduled node.
594-
SmallPtrSet<const SUnit*, 8> NextSUs;
595-
596592
/// Number of cycles it takes to issue the instructions scheduled in this
597593
/// zone. It is defined as: scheduled-micro-ops / issue-width + stalls.
598594
/// See getStalls().
@@ -669,10 +665,6 @@ class SchedBoundary {
669665
/// Micro-ops issued in the current cycle
670666
unsigned getCurrMOps() const { return CurrMOps; }
671667

672-
/// Return true if the given SU is used by the most recently scheduled
673-
/// instruction.
674-
bool isNextSU(const SUnit *SU) const { return NextSUs.count(SU); }
675-
676668
// The latency of dependence chains leading into this zone.
677669
unsigned getDependentLatency() const { return DependentLatency; }
678670

llvm/lib/CodeGen/MachineScheduler.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,6 @@ void SchedBoundary::reset() {
17931793
Available.clear();
17941794
Pending.clear();
17951795
CheckPending = false;
1796-
NextSUs.clear();
17971796
CurrCycle = 0;
17981797
CurrMOps = 0;
17991798
MinReadyCycle = UINT_MAX;
@@ -1994,9 +1993,6 @@ void SchedBoundary::releaseNode(SUnit *SU, unsigned ReadyCycle) {
19941993
Pending.push(SU);
19951994
else
19961995
Available.push(SU);
1997-
1998-
// Record this node as an immediate dependent of the scheduled node.
1999-
NextSUs.insert(SU);
20001996
}
20011997

20021998
void SchedBoundary::releaseTopNode(SUnit *SU) {
@@ -2921,13 +2917,6 @@ void GenericScheduler::tryCandidate(SchedCandidate &Cand,
29212917
!Rem.IsAcyclicLatencyLimited && tryLatency(TryCand, Cand, *Zone))
29222918
return;
29232919

2924-
// Prefer immediate defs/users of the last scheduled instruction. This is a
2925-
// local pressure avoidance strategy that also makes the machine code
2926-
// readable.
2927-
if (tryGreater(Zone->isNextSU(TryCand.SU), Zone->isNextSU(Cand.SU),
2928-
TryCand, Cand, NextDefUse))
2929-
return;
2930-
29312920
// Fall through to original instruction order.
29322921
if ((Zone->isTop() && TryCand.SU->NodeNum < Cand.SU->NodeNum)
29332922
|| (!Zone->isTop() && TryCand.SU->NodeNum > Cand.SU->NodeNum)) {

0 commit comments

Comments
 (0)