diff options
author | Chris Lattner <sabre@nondot.org> | 2001-09-14 04:32:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-09-14 04:32:55 +0000 |
commit | f6e0e2813526b4ebea473427ea5ffd88bb1559ac (patch) | |
tree | 56d0246effc4225ae9f25a1fa799f52866c88bdb /lib/CodeGen/InstrSched/InstrScheduling.cpp | |
parent | 69db8da0235bf6fe862de9b2b8852b73d664051b (diff) |
Checkin changes to:
1. Clean up the TargetMachine structure. No more wierd pointers that have to
be cast around and taken care of by the target.
2. Instruction Scheduling now takes the schedinfo as an argument. The same
should be done with the instinfo, it just isn't now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InstrSched/InstrScheduling.cpp')
-rw-r--r-- | lib/CodeGen/InstrSched/InstrScheduling.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/CodeGen/InstrSched/InstrScheduling.cpp b/lib/CodeGen/InstrSched/InstrScheduling.cpp index 825e4546a7..2358687065 100644 --- a/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -401,6 +401,7 @@ private: public: /*ctor*/ SchedulingManager (const TargetMachine& _target, + const MachineSchedInfo &schedinfo, const SchedGraph* graph, SchedPriorities& schedPrio); /*dtor*/ ~SchedulingManager () {} @@ -562,16 +563,17 @@ private: /*ctor*/ SchedulingManager::SchedulingManager(const TargetMachine& target, + const MachineSchedInfo &schedinfo, const SchedGraph* graph, SchedPriorities& _schedPrio) - : nslots(target.getSchedInfo().getMaxNumIssueTotal()), - schedInfo(target.getSchedInfo()), + : nslots(schedinfo.getMaxNumIssueTotal()), + schedInfo(schedinfo), schedPrio(_schedPrio), isched(nslots, graph->getNumNodes()), totalInstrCount(graph->getNumNodes() - 2), nextEarliestIssueTime(0), choicesForSlot(nslots), - numInClass(target.getSchedInfo().getNumSchedClasses(), 0), // set all to 0 + numInClass(schedinfo.getNumSchedClasses(), 0), // set all to 0 nextEarliestStartTime(target.getInstrInfo().getNumRealOpCodes(), (cycles_t) 0) // set all to 0 { @@ -623,10 +625,8 @@ SchedulingManager::updateEarliestStartTimes(const SchedGraphNode* node, // are still in SSA form. //--------------------------------------------------------------------------- -bool -ScheduleInstructionsWithSSA(Method* method, - const TargetMachine &target) -{ +bool ScheduleInstructionsWithSSA(Method* method, const TargetMachine &target, + const MachineSchedInfo &schedInfo) { SchedGraphSet graphSet(method, target); if (SchedDebugLevel >= Sched_PrintSchedGraphs) @@ -648,7 +648,7 @@ ScheduleInstructionsWithSSA(Method* method, cout << endl << "*** TRACE OF INSTRUCTION SCHEDULING OPERATIONS\n\n"; SchedPriorities schedPrio(method, graph); // expensive! - SchedulingManager S(target, graph, schedPrio); + SchedulingManager S(target, schedInfo, graph, schedPrio); ChooseInstructionsForDelaySlots(S, bb, graph); // modifies graph |