summaryrefslogtreecommitdiff
path: root/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2004-12-02 07:22:15 +0000
committerTanya Lattner <tonic@nondot.org>2004-12-02 07:22:15 +0000
commitad7654f7c4e8da1d76eacfff6381cf0bfd3af6c5 (patch)
tree3e5ccb40eaa9a98f3e3141804d7355c1407f3e58 /lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp
parentfa07e4fc302b1e274c292c2db4604e61d69458d5 (diff)
downloadllvm-ad7654f7c4e8da1d76eacfff6381cf0bfd3af6c5.tar.gz
llvm-ad7654f7c4e8da1d76eacfff6381cf0bfd3af6c5.tar.bz2
llvm-ad7654f7c4e8da1d76eacfff6381cf0bfd3af6c5.tar.xz
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.cpp16
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