/// instruction.
bool CheckPending;
- // For heuristics, keep a list of the nodes that immediately depend on the
- // most recently scheduled node.
- SmallPtrSet<const SUnit*, 8> NextSUs;
-
/// Number of cycles it takes to issue the instructions scheduled in this
/// zone. It is defined as: scheduled-micro-ops / issue-width + stalls.
/// See getStalls().
/// Micro-ops issued in the current cycle
unsigned getCurrMOps() const { return CurrMOps; }
- /// Return true if the given SU is used by the most recently scheduled
- /// instruction.
- bool isNextSU(const SUnit *SU) const { return NextSUs.count(SU); }
-
// The latency of dependence chains leading into this zone.
unsigned getDependentLatency() const { return DependentLatency; }
Available.clear();
Pending.clear();
CheckPending = false;
- NextSUs.clear();
CurrCycle = 0;
CurrMOps = 0;
MinReadyCycle = UINT_MAX;
Pending.push(SU);
else
Available.push(SU);
-
- // Record this node as an immediate dependent of the scheduled node.
- NextSUs.insert(SU);
}
void SchedBoundary::releaseTopNode(SUnit *SU) {
!Rem.IsAcyclicLatencyLimited && tryLatency(TryCand, Cand, *Zone))
return;
- // Prefer immediate defs/users of the last scheduled instruction. This is a
- // local pressure avoidance strategy that also makes the machine code
- // readable.
- if (tryGreater(Zone->isNextSU(TryCand.SU), Zone->isNextSU(Cand.SU),
- TryCand, Cand, NextDefUse))
- return;
-
// Fall through to original instruction order.
if ((Zone->isTop() && TryCand.SU->NodeNum < Cand.SU->NodeNum)
|| (!Zone->isTop() && TryCand.SU->NodeNum > Cand.SU->NodeNum)) {