diff options
author | Tanya Lattner <tonic@nondot.org> | 2004-12-02 07:22:15 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2004-12-02 07:22:15 +0000 |
commit | ad7654f7c4e8da1d76eacfff6381cf0bfd3af6c5 (patch) | |
tree | 3e5ccb40eaa9a98f3e3141804d7355c1407f3e58 /lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp | |
parent | fa07e4fc302b1e274c292c2db4604e61d69458d5 (diff) |
Reworked branch adding in prologue. Added check for infinite loops which are not modulo scheduled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18419 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp')
-rw-r--r-- | lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp b/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp index 29aba158c3..beab69c4db 100644 --- a/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp +++ b/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp @@ -164,9 +164,7 @@ bool MSSchedule::resourcesFree(MSchedGraphNode *node, int cycle) { } bool MSSchedule::constructKernel(int II) { - MSchedGraphNode *branchNode = 0; - MSchedGraphNode *branchANode = 0; - + int stageNum = (schedule.rbegin()->first)/ II; DEBUG(std::cerr << "Number of Stages: " << stageNum << "\n"); @@ -178,11 +176,8 @@ bool MSSchedule::constructKernel(int II) { E = schedule[i].end(); I != E; ++I) { //Check if its a branch if((*I)->isBranch()) { - if((*I)->getInst()->getOpcode() == V9::BA) - branchANode = *I; - else - branchNode = *I; assert(count == 0 && "Branch can not be from a previous iteration"); + kernel.push_back(std::make_pair(*I, count)); } else //FIXME: Check if the instructions in the earlier stage conflict @@ -193,13 +188,6 @@ bool MSSchedule::constructKernel(int II) { } } - //Add Branch to the end - kernel.push_back(std::make_pair(branchNode, 0)); - - //Add Branch Always to the end - kernel.push_back(std::make_pair(branchANode, 0)); - - if(stageNum > 0) maxStage = stageNum; else |