Numerous bug fixes and the completed modschedSB algorithm (minor bugs still exist for course).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22239 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tanya Lattner
2005-06-17 04:00:57 +00:00
parent 770e991bc4
commit d454a973a5
7 changed files with 3313 additions and 203 deletions

View File

@@ -28,7 +28,9 @@ namespace llvm {
std::map<int, std::map<int, int> > resourceNumPerCycle;
//Check if all resources are free
bool resourcesFree(MSchedGraphNode*, int);
bool resourcesFree(MSchedGraphNode*, int, int II);
bool resourceAvailable(int resourceNum, int cycle);
void useResource(int resourceNum, int cycle);
//Resulting kernel
std::vector<std::pair<MachineInstr*, int> > kernel;
@@ -42,13 +44,13 @@ namespace llvm {
public:
MSSchedule(int num) : numIssue(num) {}
MSSchedule() : numIssue(4) {}
bool insert(MSchedGraphNode *node, int cycle);
bool insert(MSchedGraphNode *node, int cycle, int II);
int getStartCycle(MSchedGraphNode *node);
void clear() { schedule.clear(); resourceNumPerCycle.clear(); kernel.clear(); }
std::vector<std::pair<MachineInstr*, int> >* getKernel() { return &kernel; }
bool constructKernel(int II, std::vector<MSchedGraphNode*> &branches, std::map<const MachineInstr*, unsigned> &indVar);
int getMaxStage() { return maxStage; }
bool defPreviousStage(Value *def, int stage);
//iterators
typedef std::map<int, std::vector<MSchedGraphNode*> >::iterator schedule_iterator;