search for: isloopinvariant

Displaying 17 results from an estimated 17 matches for "isloopinvariant".

2010 Nov 17
2
[LLVMdev] L->isLoopInvariant giving wrong results?
Hi, I'm trying to write a simple pass to print out Loop invariant instructions, using the Loop::isLoopInvariant(Instruction *I) function. it is giving me false value on instructions which should be loop invariant. the code i am using is: bool MyLoopPass::runOnLoop(Loop * L, LPPassManager &lpm){ BasicBlock* lat=L->getLoopLatch(); for (BasicBlock::iterator i = lat->begin(), e = lat->end(); i !=...
2010 Nov 17
0
[LLVMdev] L->isLoopInvariant giving wrong results?
On Nov 17, 2010, at 2:20 AM, Sreeraj a wrote: > Hi, > I'm trying to write a simple pass to print out Loop invariant instructions, using the > Loop::isLoopInvariant(Instruction *I) > function. it is giving me false value on instructions which should be loop invariant. > > the code i am using is: The isLoopInvariant method just works for scalar operations like 'add' and 'multiply'. It doesn't apply to memory operations, because h...
2010 Nov 17
2
[LLVMdev] L->isLoopInvariant giving wrong results?
Thanks Chris, I was able to weed out loop invariant arithmetic instructions using isLoopInvariant function. when i try to do an instruction->moveBefore(bb->getTerminator()) i'm getting a seg fault. any obvious reasons that i'm missing out on? Thanks in advance On Wed, Nov 17, 2010 at 10:41 PM, Chris Lattner <clattner at apple.com> wrote: > > On Nov 17, 2010, at 2:2...
2010 Nov 17
2
[LLVMdev] L->isLoopInvariant giving wrong results?
...vm-as to convert it into bytecode. On Thu, Nov 18, 2010 at 4:01 AM, Chris Lattner <clattner at apple.com> wrote: > > On Nov 17, 2010, at 1:38 PM, Sreeraj a wrote: > > > Thanks Chris, > > > > I was able to weed out loop invariant arithmetic instructions using > isLoopInvariant function. > > when i try to do an instruction->moveBefore(bb->getTerminator()) i'm > getting a seg fault. > > any obvious reasons that i'm missing out on? > > No idea, sorry. > > -Chris > > -------------- next part -------------- An HTML attachment wa...
2010 Nov 17
0
[LLVMdev] L->isLoopInvariant giving wrong results?
...> On Thu, Nov 18, 2010 at 4:01 AM, Chris Lattner <clattner at apple.com> wrote: > >> >> On Nov 17, 2010, at 1:38 PM, Sreeraj a wrote: >> >> > Thanks Chris, >> > >> > I was able to weed out loop invariant arithmetic instructions using >> isLoopInvariant function. >> > when i try to do an instruction->moveBefore(bb->getTerminator()) i'm >> getting a seg fault. >> > any obvious reasons that i'm missing out on? >> >> No idea, sorry. >> >> -Chris >> >> > -------------- next...
2010 Nov 17
0
[LLVMdev] L->isLoopInvariant giving wrong results?
On Nov 17, 2010, at 1:38 PM, Sreeraj a wrote: > Thanks Chris, > > I was able to weed out loop invariant arithmetic instructions using isLoopInvariant function. > when i try to do an instruction->moveBefore(bb->getTerminator()) i'm getting a seg fault. > any obvious reasons that i'm missing out on? No idea, sorry. -Chris
2010 Nov 17
1
[LLVMdev] L->isLoopInvariant giving wrong results?
my changed code. namespace { class MyLoopPass:public LoopPass { bool changed; public: static char ID; Loop* curLoop; // AnalysisType* AA; DominatorTree* DT; LoopInfo* LI; MyLoopPass() : LoopPass(ID){} bool isLoopInvariantInst(Instruction &I) ; bool runOnLoop(Loop * L, LPPassManager &lpm); virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); AU.addRequired<DominatorTree>(); AU.addRequired<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addPreserved<Sca...
2017 Jan 18
2
Loop Invariants Detection questions
...I'm new here, and would like to implement my own Loop Invariant Detection >> adding some more information on Quasi-Invariants. >> >> First, is there anything about Quasi-Invariants detection in LLVM I would >> missed? >> >> I've seen LICM using LoopInfo::isLoopInvariant for finding invariants. >> It seems that this method considers a Value invariant if: >> - it's an Instruction not presents in the current loop (what does it >> mean? There is no dependence analysis on In and Out "variables" of all >> instructions in the loop?)...
2017 Jan 17
2
Loop Invariants Detection questions
Hi all! I'm new here, and would like to implement my own Loop Invariant Detection adding some more information on Quasi-Invariants. First, is there anything about Quasi-Invariants detection in LLVM I would missed? I've seen LICM using LoopInfo::isLoopInvariant for finding invariants. It seems that this method considers a Value invariant if: - it's an Instruction not presents in the current loop (what does it mean? There is no dependence analysis on In and Out "variables" of all instructions in the loop?) - this Value is not an Instruction (...
2017 Jan 19
2
Loop Invariants Detection questions
...ould like to implement my own Loop Invariant >>> Detection adding some more information on Quasi-Invariants. >>> >>> First, is there anything about Quasi-Invariants detection in LLVM I >>> would missed? >>> >>> I've seen LICM using LoopInfo::isLoopInvariant for finding invariants. >>> It seems that this method considers a Value invariant if: >>> - it's an Instruction not presents in the current loop (what does it >>> mean? There is no dependence analysis on In and Out "variables" of all >>> instruction...
2009 Oct 12
0
[LLVMdev] Accessing Loop Variables
...j++) > A[i][j+k] = i + j; > > Is there anyway for me to know that in A[i][j+k], i & j are loop > variables > whereas k is not! The ScalarEvolution analysis can help here. If you've already identified i, j, and k yourself, you can call getSCEV on them and use the isLoopInvariant and hasComputableLoopEvolution member functions. ScalarEvolution doesn't yet help in identifying the indices used in each dimension of a multi-dimensional array reference in the way that a traditional dependence analysis would want to see them, though that's a future goal. Dan
2008 Feb 22
2
[LLVMdev] ScalarEvolution Patch
Dear All, Is the following patch to ScalarEvolution correct? It seems that without it, the enclosing for loop could skip over SCEVAddRecExpr's in the Ops[] array. -- John T. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: scpatch URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080222/3ff8edd7/attachment.ksh>
2009 Oct 12
3
[LLVMdev] Accessing Loop Variables
Hi, How do I access the loop variables in a loop. for(i = 0; i < N; i++) for(j = 0; j < M; j++) A[i][j+k] = i + j; Is there anyway for me to know that in A[i][j+k], i & j are loop variables whereas k is not! Regards, Prasenjit Chakraborty Performance Modeling and Analysis IBM Systems & Technology Lab
2017 Jan 20
2
Loop Invariants Detection questions
...y own Loop Invariant >>>> Detection adding some more information on Quasi-Invariants. >>>> >>>> First, is there anything about Quasi-Invariants detection in LLVM I >>>> would missed? >>>> >>>> I've seen LICM using LoopInfo::isLoopInvariant for finding invariants. >>>> It seems that this method considers a Value invariant if: >>>> - it's an Instruction not presents in the current loop (what does it >>>> mean? There is no dependence analysis on In and Out "variables" of all >>>...
2012 Dec 10
3
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
...n add with everything but the specified operand. @@ -3044,10 +3064,10 @@ const SCEV *ScalarEvolution::createNodeForPHI(PHINode *PN) { if (i != FoundIndex) Ops.push_back(Add->getOperand(i)); const SCEV *Accum = getAddExpr(Ops); - + bool AccumIsLoopInvariant = isLoopInvariant(Accum, L); // This is not a valid addrec if the step amount is varying each // loop iteration, but is not itself an addrec in this loop. - if (isLoopInvariant(Accum, L) || + if (AccumIsLoopInvariant || (isa<SCEVAd...
2018 May 10
2
LLVM SCEV isAddRecNeverPoison and strength reduction
+CC llvm-dev On Tue, May 8, 2018 at 2:34 AM, Gal Zohar <Gal.Zohar at ceva-dsp.com> wrote: > I noticed that SCEV, when trying to perform strength reduction, doesn’t use > the ability to prove an induction variable does not signed/unsigned wrap due > to infinite loops. > > Is there an easy way to use the isAddRecNeverPoison function when > determining if strength reduction
2016 Jun 02
4
Floating Point SCEV Analysis
For reference, the case with a variable loop count is filed as PR27894: https://llvm.org/bugs/show_bug.cgi?id=27894 And the case with a constant loop count is filed as PR27899: https://llvm.org/bugs/show_bug.cgi?id=27899 On Thu, Jun 2, 2016 at 7:48 AM, Demikhovsky, Elena via llvm-dev < llvm-dev at lists.llvm.org> wrote: > I implemented IV simplification with FP SCEV and uploaded a new