mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user