Displaying 10 results from an estimated 10 matches for "getloop".
Did you mean:
netloop
2011 May 01
0
[LLVMdev] ScalarEvolution::getSVECAtScope
...SCEVAtScope with a Value
which is an Instruction inside the provided Loop? If so, I believe
there is a bug in computeSCEVAtScope. Specifically:
04716 // If the scope is outside the addrec's loop, evaluate it by using the
04717 // loop exit value of the addrec.
04718 if (!AddRec->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 == getCouldNotComp...
2011 May 01
0
[LLVMdev] ScalarEvolution::getSVECAtScope
...which is an Instruction inside the provided Loop? If so, I believe
> there is a bug in computeSCEVAtScope. Specifically:
>
> 04716 // If the scope is outside the addrec's loop, evaluate it by using the
> 04717 // loop exit value of the addrec.
> 04718 if (!AddRec->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 (Backedg...
2010 Jun 29
2
[LLVMdev] Confuse on getSCEVAtScope
...e, + ,4}<loop0>, where some_value is
getSCEVAtScope({(32 + @edge.8265),+,32}<Loop0>, Loop1). because Loop0
have a computable backedge taken count, some_value should not be a
SCEVAddRec.
and later i have a look computeSCEVAtScope, and see the function do
not do any thing when AddRec->getLoop()->contains(L).
why computeSCEVAtScope not try to get the operands in the current
scope like the function do with SCEVCommutativeExpr, like:
if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(V)) {
if (!L || !AddRec->getLoop()->contains(L)) {
...
// Then, e...
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>
2014 Apr 22
2
[LLVMdev] SCEV and induction variable identification
...asic-block in a loop
for each instruction J in a basic block
if ( J is a PHINode) {
const SCEV *S = SE->getSCEV(J);
const SCEVAddRecExpr *SARE = dyn_cast<SCEVAddRecExpr>(S);
if (SARE) {
const Loop *CurLoop = SARE->getLoop();
if (CurLoop == L) {
/* => J is the induction variable*/
}
}
}
SCEVAddRecExpr is said to be able to handle any polynomial recurrence
on the trip count of the loop. However, for my sample program, The dyn_cas...
2011 May 07
1
[LLVMdev] Loop transformations using LLVM
...xample of finding IVs without iterating over instructions. But you may need to generalize it a bit for your purpose.
A completely general approach to IV analysis is ScalarEvolution. You can query the expression for a loop header phi using ScalarEvolution::getSCEV. If it returns SCEVAddRecExpr with getLoop() == ThisLoop, then you've found an IV. You can build a new IV by replacing the "step" with SCEVAddExpr(1 + OrigStep). To materialize it in IR, you need to use a SCEVExpander. ...probably more complicated than you need.
-Andy
>
>
> From: llvmdev-bounces at cs.uiuc.edu [m...
2010 Jun 29
0
[LLVMdev] Confuse on getSCEVAtScope
...Jun 29, 2010, at 7:08 AM, ether zhhb wrote:
>
> why computeSCEVAtScope not try to get the operands in the current
> scope like the function do with SCEVCommutativeExpr, like:
>
> if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(V)) {
> if (!L || !AddRec->getLoop()->contains(L)) {
> ...
> // Then, evaluate the AddRec.
> AddRec = AddRec->evaluateAtIteration(BackedgeTakenCount, *this);
> }
>
> try to evalue every operand of AddRec;
>
> return AddRec;
> }
That looks reasonable to me. Do you have a te...
2011 May 05
0
[LLVMdev] Loop transformations using LLVM
Malveeka,
You can use the LoopInfo analysis to find the induction variable.
http://llvm.org/docs/doxygen/html/classllvm_1_1Loop.html#a72bbf45d2e00971f56bf8cfe4e1df01c
Cheers,
Nadav
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Malveeka Tewari
Sent: Thursday, May 05, 2011 14:51
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Loop transformations
2011 May 05
2
[LLVMdev] Loop transformations using LLVM
Hi
I am trying to write up a transformation for the following code where
instead of incrementing the loop variable by 1, I increment it by 2 ie.
for (i=0; i < THRES; *i++*) {
//do something
}
gets transformed to
for (i=0; i < THRES; *i+=2*) {
//do something
}
I am thinking of transforming the llvm bit-code in the following way.
Iterate over the function for the original code till I
2012 Dec 10
3
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
...ount is varying each
// loop iteration, but is not itself an addrec in this loop.
- if (isLoopInvariant(Accum, L) ||
+ if (AccumIsLoopInvariant ||
(isa<SCEVAddRecExpr>(Accum) &&
cast<SCEVAddRecExpr>(Accum)->getLoop() == L)) {
SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap;
@@ -3071,11 +3091,40 @@ const SCEV *ScalarEvolution::createNodeForPHI(PHINode *PN) {
}
const SCEV *StartVal = getSCEV(StartValueV);
- const SCEV *PHISCEV = getAddRecExpr(StartVal, Acc...