mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-31 09:25:42 +00:00
Various bits of framework needed for precise machine-level selection
DAG scheduling during isel. Most new functionality is currently guarded by -enable-sched-cycles and -enable-sched-hazard. Added InstrItineraryData::IssueWidth field, currently derived from ARM itineraries, but could be initialized differently on other targets. Added ScheduleHazardRecognizer::MaxLookAhead to indicate whether it is active, and if so how many cycles of state it holds. Added SchedulingPriorityQueue::HasReadyFilter to allowing gating entry into the scheduler's available queue. ScoreboardHazardRecognizer now accesses the ScheduleDAG in order to get information about it's SUnits, provides RecedeCycle for bottom-up scheduling, correctly computes scoreboard depth, tracks IssueCount, and considers potential stall cycles when checking for hazards. ScheduleDAGRRList now models machine cycles and hazards (under flags). It tracks MinAvailableCycle, drives the hazard recognizer and priority queue's ready filter, manages a new PendingQueue, properly accounts for stall cycles, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122541 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -63,11 +63,12 @@ private:
|
||||
|
||||
public:
|
||||
ScheduleDAGList(MachineFunction &mf,
|
||||
SchedulingPriorityQueue *availqueue,
|
||||
ScheduleHazardRecognizer *HR)
|
||||
: ScheduleDAGSDNodes(mf),
|
||||
AvailableQueue(availqueue), HazardRec(HR) {
|
||||
}
|
||||
SchedulingPriorityQueue *availqueue)
|
||||
: ScheduleDAGSDNodes(mf), AvailableQueue(availqueue) {
|
||||
|
||||
const TargetMachine &tm = mf.getTarget();
|
||||
HazardRec = tm.getInstrInfo()->CreateTargetHazardRecognizer(&tm, this);
|
||||
}
|
||||
|
||||
~ScheduleDAGList() {
|
||||
delete HazardRec;
|
||||
@@ -202,7 +203,7 @@ void ScheduleDAGList::ListScheduleTopDown() {
|
||||
SUnit *CurSUnit = AvailableQueue->pop();
|
||||
|
||||
ScheduleHazardRecognizer::HazardType HT =
|
||||
HazardRec->getHazardType(CurSUnit);
|
||||
HazardRec->getHazardType(CurSUnit, 0/*no stalls*/);
|
||||
if (HT == ScheduleHazardRecognizer::NoHazard) {
|
||||
FoundSUnit = CurSUnit;
|
||||
break;
|
||||
@@ -257,12 +258,8 @@ void ScheduleDAGList::ListScheduleTopDown() {
|
||||
// Public Constructor Functions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// createTDListDAGScheduler - This creates a top-down list scheduler with a
|
||||
/// new hazard recognizer. This scheduler takes ownership of the hazard
|
||||
/// recognizer and deletes it when done.
|
||||
/// createTDListDAGScheduler - This creates a top-down list scheduler.
|
||||
ScheduleDAGSDNodes *
|
||||
llvm::createTDListDAGScheduler(SelectionDAGISel *IS, CodeGenOpt::Level) {
|
||||
return new ScheduleDAGList(*IS->MF,
|
||||
new LatencyPriorityQueue(),
|
||||
IS->CreateTargetHazardRecognizer());
|
||||
return new ScheduleDAGList(*IS->MF, new LatencyPriorityQueue());
|
||||
}
|
||||
|
Reference in New Issue
Block a user