search for: getcouldnotcomput

Displaying 15 results from an estimated 15 matches for "getcouldnotcomput".

Did you mean: getcouldnotcompute
2012 Feb 08
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
...tion::ComputeExitLimit(const Loop > *L, BasicBlock *ExitingBlock) { >   // >   // FIXME: we should be able to handle switch instructions (with a > single exit) >   BranchInst *ExitBr = dyn_cast<BranchInst>(ExitingBlock->getTerminator()); > + >   if (ExitBr == 0) return getCouldNotCompute(); >   assert(ExitBr->isConditional() && "If unconditional, it can't be in loop!"); > > +  BranchInst* BrFirstSucc = dyn_cast<BranchInst>(ExitBr-> > +                                            getSuccessor(0)->getTerminator()); > +  BranchInst*...
2012 Feb 08
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
...-4293,9 +4293,15 @@ ScalarEvolution::ComputeExitLimit(const Loop *L, BasicBlock *ExitingBlock) { // // FIXME: we should be able to handle switch instructions (with a single exit) BranchInst *ExitBr = dyn_cast<BranchInst>(ExitingBlock->getTerminator()); + if (ExitBr == 0) return getCouldNotCompute(); assert(ExitBr->isConditional() && "If unconditional, it can't be in loop!"); + BranchInst* BrFirstSucc = dyn_cast<BranchInst>(ExitBr-> + getSuccessor(0)->getTerminator()); + BranchInst* BrSecondSucc = dyn_cast...
2012 Feb 08
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
..._cast<BranchInst>(ExitBr-> + getSuccessor(0)->getTerminator()); + BranchInst* BrSecondSucc = dyn_cast<BranchInst>(ExitBr-> + getSuccessor(1)->getTerminator()); + if (ExitBr == 0) return getCouldNotCompute(); assert(ExitBr->isConditional() && "If unconditional, it can't be in loop!"); @@ -4315,8 +4320,12 @@ ScalarEvolution::ComputeExitLimit(const Loop *L, BasicBlock *ExitingBlock) { // if (ExitBr->getSuccessor(0) != L->getHeader() && ExitBr-&gt...
2012 Feb 08
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
...{ >> >   // >> >   // FIXME: we should be able to handle switch instructions (with a >> > single exit) >> >   BranchInst *ExitBr = >> > dyn_cast<BranchInst>(ExitingBlock->getTerminator()); >> > + >> >   if (ExitBr == 0) return getCouldNotCompute(); >> >   assert(ExitBr->isConditional() && "If unconditional, it can't be in >> > loop!"); >> > >> > +  BranchInst* BrFirstSucc = dyn_cast<BranchInst>(ExitBr-> >> > + >> >  getSuccessor(0)->getTerminator())...
2012 Feb 08
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
...gt; *L, BasicBlock *ExitingBlock) { > > // > > // FIXME: we should be able to handle switch instructions (with a > > single exit) > > BranchInst *ExitBr = > dyn_cast<BranchInst>(ExitingBlock->getTerminator()); > > + > > if (ExitBr == 0) return getCouldNotCompute(); > > assert(ExitBr->isConditional() && "If unconditional, it can't be in > loop!"); > > > > + BranchInst* BrFirstSucc = dyn_cast<BranchInst>(ExitBr-> > > + > getSuccessor(0)->getTerminator()); > > + BranchInst* BrSecon...
2012 Feb 09
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
...E: we should be able to handle switch instructions (with a >> >> > single exit) >> >> >   BranchInst *ExitBr = >> >> > dyn_cast<BranchInst>(ExitingBlock->getTerminator()); >> >> > + >> >> >   if (ExitBr == 0) return getCouldNotCompute(); >> >> >   assert(ExitBr->isConditional() && "If unconditional, it can't be in >> >> > loop!"); >> >> > >> >> > +  BranchInst* BrFirstSucc = dyn_cast<BranchInst>(ExitBr-> >> >> > + >&g...
2012 Feb 08
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
...;> > // FIXME: we should be able to handle switch instructions (with a > >> > single exit) > >> > BranchInst *ExitBr = > >> > dyn_cast<BranchInst>(ExitingBlock->getTerminator()); > >> > + > >> > if (ExitBr == 0) return getCouldNotCompute(); > >> > assert(ExitBr->isConditional() && "If unconditional, it can't be in > >> > loop!"); > >> > > >> > + BranchInst* BrFirstSucc = dyn_cast<BranchInst>(ExitBr-> > >> > + > >> > getSuc...
2012 Feb 09
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
...to handle switch instructions (with a >>> >> > single exit) >>> >> >   BranchInst *ExitBr = >>> >> > dyn_cast<BranchInst>(ExitingBlock->getTerminator()); >>> >> > + >>> >> >   if (ExitBr == 0) return getCouldNotCompute(); >>> >> >   assert(ExitBr->isConditional() && "If unconditional, it can't be in >>> >> > loop!"); >>> >> > >>> >> > +  BranchInst* BrFirstSucc = dyn_cast<BranchInst>(ExitBr-> >>> &g...
2012 Feb 09
1
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
...structions (with a >>>> >> > single exit) >>>> >> >   BranchInst *ExitBr = >>>> >> > dyn_cast<BranchInst>(ExitingBlock->getTerminator()); >>>> >> > + >>>> >> >   if (ExitBr == 0) return getCouldNotCompute(); >>>> >> >   assert(ExitBr->isConditional() && "If unconditional, it can't be in >>>> >> > loop!"); >>>> >> > >>>> >> > +  BranchInst* BrFirstSucc = dyn_cast<BranchInst>(ExitBr->...
2012 Feb 27
0
[LLVMdev] How to unroll loop with non-constant boundary
On 27.02.2012, at 18:49, Eli Friedman wrote: > On Mon, Feb 27, 2012 at 9:30 AM, Benjamin Kramer > <benny.kra at googlemail.com> wrote: >> >> On 27.02.2012, at 17:13, Николай Лихогруд wrote: >> >>> Dear LLVM, >>> >>> Consider two loops with one interation - >>> First with constant lower bound, second with usual
2012 Feb 27
2
[LLVMdev] How to unroll loop with non-constant boundary
On Mon, Feb 27, 2012 at 9:30 AM, Benjamin Kramer <benny.kra at googlemail.com> wrote: > > On 27.02.2012, at 17:13, Николай Лихогруд wrote: > >> Dear LLVM, >> >>     Consider two loops with one interation - >>     First with constant lower bound, second with usual non-constant lower bound: >> >>     int main(int argc, char ** argv) >>     {
2011 May 01
0
[LLVMdev] ScalarEvolution::getSVECAtScope
...Rec->getLoop()->contains(L)) { 04719       // To evaluate this recurrence, we need to know how many times the AddRec 04720       // loop iterates.  Compute this now. 04721       const SCEV *BackedgeTakenCount = getBackedgeTakenCount(AddRec->getLoop()); 04722       if (BackedgeTakenCount == getCouldNotCompute()) return AddRec; 04723 04724       // Then, evaluate the AddRec. 04725       return AddRec->evaluateAtIteration(BackedgeTakenCount, *this); 04726     } The guard checks that !AddRec->getLoop()->contains(L), but not !L->contains(AddRec->getLoop()). Consequently, if getSCEVAtScope...
2011 May 01
0
[LLVMdev] ScalarEvolution::getSVECAtScope
...(L)) { > 04719       // To evaluate this recurrence, we need to know how many > times the AddRec > 04720       // loop iterates.  Compute this now. > 04721       const SCEV *BackedgeTakenCount = > getBackedgeTakenCount(AddRec->getLoop()); > 04722       if (BackedgeTakenCount == getCouldNotCompute()) return AddRec; > 04723 > 04724       // Then, evaluate the AddRec. > 04725       return AddRec->evaluateAtIteration(BackedgeTakenCount, *this); > 04726     } > > The guard checks that !AddRec->getLoop()->contains(L), but not > !L->contains(AddRec->getLoop())....
2016 Jun 30
1
Regarding ScalarEvolution's loop backedge computation
Hi Pankaj, Chawla, Pankaj via llvm-dev wrote: > It looks like ScalarEvolution bails out of loop backedge computation if > it cannot prove the IV stride as either positive or negative (based on > loop control condition). I think this logic can be refined for signed IVs. > > Consider this simple loop- > > void foo(int *A, int n, int s) { > > int i; > >
2016 Jun 29
3
Regarding ScalarEvolution's loop backedge computation
Hi, It looks like ScalarEvolution bails out of loop backedge computation if it cannot prove the IV stride as either positive or negative (based on loop control condition). I think this logic can be refined for signed IVs. Consider this simple loop- void foo(int *A, int n, int s) { int i; for(i=0; i<n; i += s) { A[i]++; } } The IV of this loop has this SCEV form-