search for: scevaddrecexpr

Displaying 20 results from an estimated 74 matches for "scevaddrecexpr".

2015 Mar 19
3
[LLVMdev] Cast to SCEVAddRecExpr
Yes, I can get "SCEVAddRecExpr" from operands of "(sext i32 {2,+,2}<%for.body4> to i64)". So whenever SCEV cast to "SCEVAddRecExpr" fails, we have drill down for such patterns ? Is that the right way ? Regards, Ashutosh -----Original Message----- From: Nick Lewycky [mailto:nicholas at mxc.ca]...
2015 Mar 19
2
[LLVMdev] Cast to SCEVAddRecExpr
Hi Nick, Thanks for looking into it. I have tried that as well but it didn't worked. "AddExpr->getOperand(0))" node is: " (4 * (sext i32 {2,+,2}<%for.body4> to i64))<nsw>" When I cast this to "SCEVAddRecExpr" it returns NULL. Regards, Ashutosh -----Original Message----- From: Nick Lewycky [mailto:nicholas at mxc.ca] Sent: Thursday, March 19, 2015 12:19 PM To: Nema, Ashutosh Cc: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Cast to SCEVAddRecExpr Nema, Ashutosh wrote: > Hi, > I'm tryi...
2015 Mar 19
2
[LLVMdev] Cast to SCEVAddRecExpr
Hi, I'm trying to cast one of the SCEV node to "SCEVAddRecExpr". Every time cast return NULL, and I'm unable to do this. SCEV Node: ((4 * (sext i32 {2,+,2}<%for.body4> to i64))<nsw> + %var)<nsw> Casting: const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(SCEVNode); 'var' is of type float pointer (float*). Without...
2015 Mar 31
2
[LLVMdev] Cast to SCEVAddRecExpr
Sorry typo in test case, Please ignore previous mail. Consider below case: for (j=1; j < itr; j++) { - - - - for (i=1; i < itr; i++) { { temp= var[i << 1]; - - - - - } } In the above example, we are unable to get "SCEVAddRecExpr" for "var[i << 1]" Its "SCEVAddRecExpr" is computable in *Outer Loop* I expected SCEV will hoist AddRec to top level, but it's not doing that. Instead if I change "var[i << 1]" to "var[i * 2]" then I'm getting "SCEVAddRecEx...
2012 Apr 25
2
[LLVMdev] About Scalar Evolution Pass and SCEVAddRecExpr
Hi, I wonder how many of you are familiar with scalar evolution pass. I met a problem regarding to the SCEVAddRecExpr. Say for the code: const int N = 100; int a[N]; for(int i=0;i<N;i++) a[i] = 0; For the access of a[i], the pass will transform this a[i] to a SCEVAddRecExpr <@a, +, sizeof(int)><BB_Name>, which means the access of the array `a' starts from the address `a' and has an access st...
2012 Apr 25
0
[LLVMdev] About Scalar Evolution Pass and SCEVAddRecExpr
...vant loop exit value cannot be computed, the /// original value V is returned. best regards ether On Wed, Apr 25, 2012 at 5:16 PM, ihcinihsdk <ali28 at wisc.edu> wrote: > > Hi, > I wonder how many of you are familiar with scalar evolution pass. I met a > problem regarding to the SCEVAddRecExpr. Say for the code: > const int N = 100; > int a[N]; > for(int i=0;i<N;i++) a[i] = 0; > For the access of a[i], the pass will transform this a[i] to a > SCEVAddRecExpr <@a, +, sizeof(int)><BB_Name>, which means the access of the > array `a' starts from the addres...
2016 Oct 04
2
Getting the symbolic expression for an address calculation
How do you generate a SCEVAddRecExpr from a SCEV? It tried dyn_casting and it seems like that the SCEV returned by getSCEV is not a SCEVAddRecExpr. Thanks On Fri, Sep 30, 2016 at 4:16 PM, Friedman, Eli <efriedma at codeaurora.org> wrote: > On 9/30/2016 12:16 PM, Charith Mendis via llvm-dev wrote: > >> >> Hi...
2014 Apr 01
2
[LLVMdev] Construction of SCEVAddRecExpr
Hello, I'm studying how the SCEV analyzis works and how to use it and I could not create an example where the SCEV analyzis identifies an expression as "SCEVAddRecExpr". Aren't the expressions below the kind of pattern that should be represented as a "AddRecExpr" ? SCEV: (1 + (2 * %3) or SCEV: (%1 + (2 * %3) or SCEV: (%1 + (%2 * %3) In my experiments they are always recognized as just "AddExpr" (not *Rec*). Can someone help me o...
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>
2015 Apr 01
2
[LLVMdev] Cast to SCEVAddRecExpr
...er casts as well (i.e. SCEVTruncateExpr, SCEVZeroExtendExpr). Regards, Ashutosh -----Original Message----- From: Sanjoy Das [mailto:sanjoy at playingwithpointers.com] Sent: Tuesday, March 31, 2015 9:41 AM To: Nema, Ashutosh Cc: Nick Lewycky; llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Cast to SCEVAddRecExpr On Mon, Mar 30, 2015 at 8:47 PM, Nema, Ashutosh <Ashutosh.Nema at amd.com> wrote: > Sorry typo in test case, Please ignore previous mail. > > Consider below case: > > for (j=1; j < itr; j++) { > - - - - > for (i=1; i < itr; i++) { > { >...
2014 Apr 22
2
[LLVMdev] SCEV and induction variable identification
...apable of detecting the induction variable 'sz' in this case? The code snippet I am using to solve the problem is for each basic-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...
2005 Jul 28
2
[LLVMdev] help with pointer-to-array conversion
...ndVarSimplify::runOnLoop(LoopInfo *LI, Loop *L) { > 617c634 < EliminatePointerRecurrence(PN, Preheader, DeadInsts); --- > EliminatePointerRecurrence(LI, L, PN, Preheader, DeadInsts); 626c643 < runOnLoop(*I); --- > runOnLoop(LI,*I); 652,653c669,670 < if (SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(SCEV)) < if (AR->getNumOperands() == 2 && isa<SCEVConstant>(AR->getOperand(1))) --- > if (1)//SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(SCEV)) > if (1)//AR->getNumOperands() == 2 &&...
2015 Jun 11
2
[LLVMdev] Question about NoWrap flag for SCEVAddRecExpr
> On Jun 10, 2015, at 11:44 PM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote: > >> Base is treated as unsigned so 0xff…ff + 1 would be 0x100…00 > > This is the part I was missing, thanks for pointing out the FAQ. So > the infinitely precise address computed by a GEP is > > zext(Base) + sext(Idx0) + sext(Idx1) … ? Yes, that is the way I read it.
2013 Jul 28
0
[LLVMdev] [Polly] Analysis of the expensive compile-time overhead of Polly Dependence pass
...cpp > @@ -86,6 +86,14 @@ public: > isl_aff *Affine = > isl_aff_zero_on_domain(isl_local_space_from_space(Space)); > Affine = isl_aff_add_coefficient_si(Affine, isl_dim_param, 0, 1); > + if (Scev->getSCEVType() == scAddRecExpr) { > + const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(Scev); The canonical pattern for this is: if (SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Scev)) { > + const SCEVConstant *c = cast<SCEVConstant>(AR->getOperand(0)); This is obviously a hack. The base is not always a constant. You can...
2015 Jun 11
2
[LLVMdev] Question about NoWrap flag for SCEVAddRecExpr
> On Jun 11, 2015, at 12:48 AM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote: > > On Thu, Jun 11, 2015 at 12:02 AM, Adam Nemet <anemet at apple.com <mailto:anemet at apple.com>> wrote: >> >>> On Jun 10, 2015, at 11:44 PM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote: >>> >>>> Base is treated as unsigned so
2015 Jun 10
3
[LLVMdev] Question about NoWrap flag for SCEVAddRecExpr
...case: float x[1024], y[1024]; void myloop1() { for (long int k = 0; k < 512; k++) { x[2*k] = x[2*k]+y[k]; } } Vectorization failed due to "unsafe dependent memory operation". I traced the LoopAccessAnalysis.cpp and found the reason is the NoWrapFlag for SCEVAddRecExpr is not set and consequently the dependence distant became unknown. Can anyone familiar with ScalarRevolution tell me whether this is an expected behavior or a bug? Tong -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev...
2016 Sep 30
2
Getting the symbolic expression for an address calculation
Hi all, What is the best way to get the symbolic expression for an address calculation in llvm specially when memory addresses are calculated within a loop. Use case: I want to know what loop induction variables are used for a particular address calculation and in what symbolic context. Thereby, I want to identify which stores and loads will be contiguous in memory if I unroll each of the
2015 Jun 11
2
[LLVMdev] Question about NoWrap flag for SCEVAddRecExpr
...>> not in this specific case. >>> >>> [2]: So a worthwhile project is to have the vectorizer construct sign >>> extend expressions of add recurrences that it really cares about >>> proving no-wrap of and then check the flags on the >>> SCEVAddRecExpr. It may consume too much compile time, so there's >>> a tricky trade-off here. >>> >>> >>> -- Sanjoy >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http:...
2015 Mar 24
3
[LLVMdev] RFC: Loop versioning for LICM
...invariant store. > > By debugging sample programs I can see its adding invariant stores pointers > to runtime check. > > Can you provide more details, what you meant by above comment. I would have expected canCheckPtrAtRT/hasComputableBounds to give up when the pointer was not a SCEVAddRecExpr. How do we get passed that point? Adam > > Regards, > Ashutosh > > From: Adam Nemet [mailto:anemet at apple.com] > Sent: Friday, March 20, 2015 10:30 AM > To: Nema, Ashutosh > Cc: Hal Finkel; Philip Reames; llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] RFC: Loop...
2010 Jun 29
2
[LLVMdev] Confuse on getSCEVAtScope
...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, evaluate the AddRec. AddRec = AddRec->evaluateAtIteration(BackedgeTakenCount, *this); } try to evalue every operand of AddRec; return AddRec; } th...