From ad7654f7c4e8da1d76eacfff6381cf0bfd3af6c5 Mon Sep 17 00:00:00 2001 From: Tanya Lattner Date: Thu, 2 Dec 2004 07:22:15 +0000 Subject: 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 --- lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp') 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 -- cgit v1.2.3-18-g5258