summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-14 04:32:55 +0000
committerChris Lattner <sabre@nondot.org>2001-09-14 04:32:55 +0000
commitf8464e4b8d676bf1aa9d4b27de820a15578b81d5 (patch)
tree28ebe4ca89dd177fa6b7fc101a3a29f3beab3b80 /llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
parentdce33dfa4b87ce5058cdf93b9aa3c0c20156cf00 (diff)
downloadbcm5719-llvm-f8464e4b8d676bf1aa9d4b27de820a15578b81d5.tar.gz
bcm5719-llvm-f8464e4b8d676bf1aa9d4b27de820a15578b81d5.zip
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. llvm-svn: 565
Diffstat (limited to 'llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp')
-rw-r--r--llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
index 825e4546a7e..23586870655 100644
--- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud