@@ -763,7 +763,7 @@ class GenericSchedulerBase : public MachineSchedStrategy {
763
763
public:
764
764
// / Represent the type of SchedCandidate found within a single queue.
765
765
// / pickNodeBidirectional depends on these listed by decreasing priority.
766
- enum CandReason {
766
+ enum CandReason : uint8_t {
767
767
NoCand, Only1, PhysRegCopy, RegExcess, RegCritical, Stall, Cluster, Weak,
768
768
RegMax, ResourceReduce, ResourceDemand, BotHeightReduce, BotPathReduce,
769
769
TopDepthReduce, TopPathReduce, NextDefUse, NodeOrder};
@@ -811,8 +811,8 @@ class GenericSchedulerBase : public MachineSchedStrategy {
811
811
// The reason for this candidate.
812
812
CandReason Reason;
813
813
814
- // Set of reasons that apply to multiple candidates .
815
- uint32_t RepeatReasonSet ;
814
+ // Whether this candidate should be scheduled at top/bottom .
815
+ bool AtTop ;
816
816
817
817
// Register pressure values for the best candidate.
818
818
RegPressureDelta RPDelta;
@@ -821,7 +821,7 @@ class GenericSchedulerBase : public MachineSchedStrategy {
821
821
SchedResourceDelta ResDelta;
822
822
823
823
SchedCandidate (const CandPolicy &policy)
824
- : Policy(policy), SU(nullptr ), Reason(NoCand), RepeatReasonSet( 0 ) {}
824
+ : Policy(policy), SU(nullptr ), Reason(NoCand), AtTop( false ) {}
825
825
826
826
bool isValid () const { return SU; }
827
827
@@ -830,13 +830,11 @@ class GenericSchedulerBase : public MachineSchedStrategy {
830
830
assert (Best.Reason != NoCand && " uninitialized Sched candidate" );
831
831
SU = Best.SU ;
832
832
Reason = Best.Reason ;
833
+ AtTop = Best.AtTop ;
833
834
RPDelta = Best.RPDelta ;
834
835
ResDelta = Best.ResDelta ;
835
836
}
836
837
837
- bool isRepeat (CandReason R) { return RepeatReasonSet & (1 << R); }
838
- void setRepeat (CandReason R) { RepeatReasonSet |= (1 << R); }
839
-
840
838
void initResourceDelta (const ScheduleDAGMI *DAG,
841
839
const TargetSchedModel *SchedModel);
842
840
};
@@ -913,11 +911,12 @@ class GenericScheduler : public GenericSchedulerBase {
913
911
914
912
void tryCandidate (SchedCandidate &Cand,
915
913
SchedCandidate &TryCand,
916
- SchedBoundary & Zone);
914
+ SchedBoundary * Zone);
917
915
918
916
SUnit *pickNodeBidirectional (bool &IsTopNode);
919
917
920
918
void pickNodeFromQueue (SchedBoundary &Zone,
919
+ const CandPolicy &ZonePolicy,
921
920
const RegPressureTracker &RPTracker,
922
921
SchedCandidate &Candidate);
923
922
0 commit comments