search for: getmulexpr

Displaying 11 results from an estimated 11 matches for "getmulexpr".

2013 Nov 16
0
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
...end, label %for.body > > And, when going through the GEP: > > %0 = shl nsw i64 %indvars.iv, 1 > %arrayidx = getelementptr inbounds i32* %b, i64 %0 > > ScalarEvolution::createNodeForGEP() is losing the SCEV::FlagNSW, and I believe it's because of this piece of code in getMulExpr(): > > // Build the new addrec. Propagate the NUW and NSW flags if both the > // outer mul and the inner addrec are guaranteed to have no overflow. > // > // No self-wrap cannot be guaranteed after changing the step size, but > // will be inferred if...
2014 Feb 05
2
[LLVMdev] SCEV implementation and limitations, do we need "pow"?
...ng the SCEV of the second operand and then checking if the first one is a multiply, if it is it "recurse" (iteratively) and repeat on this multiply. Example : a = b * c; d = e * f; g = a * d; when computing SCEV(g), (if I got it right) it is actually computing: SCEV(g) = getMulExpr(b , SCEV(c), SCEV(d)) There is a lack of symmetry for which I can't see the rational. I would expect one of these three possibilities: 1) Just using the SCEV of the operands: SCEV(g) = getMulExpr(SCEV(a), SCEV(d)); 2) Being "smart" and flatten when operands are multiply, but symm...
2013 Nov 13
2
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
...512 br i1 %exitcond, label %for.end, label %for.body And, when going through the GEP: %0 = shl nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds i32* %b, i64 %0 ScalarEvolution::createNodeForGEP() is losing the SCEV::FlagNSW, and I believe it's because of this piece of code in getMulExpr(): // Build the new addrec. Propagate the NUW and NSW flags if both the // outer mul and the inner addrec are guaranteed to have no overflow. // // No self-wrap cannot be guaranteed after changing the step size, but // will be inferred if either NUW or NSW is true....
2013 Nov 16
2
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
On 16 November 2013 06:56, Andrew Trick <atrick at apple.com> wrote: > - getMulExpr constructs a new AddRec with NSW: > > Flags = AddRec->getNoWrapFlags(clearFlags(Flags, SCEV::FlagNW)); > const SCEV *NewRec = getAddRecExpr(NewOps, AddRecLoop, Flags); > Hi Andrew, Thanks for looking at this. Clearing the flags here makes sense, but it's being too...
2014 Feb 08
3
[LLVMdev] SCEV implementation and limitations, do we need "pow"?
...if it is it "recurse" >> (iteratively) and repeat on this multiply. >> Example : >> >> a = b * c; >> d = e * f; >> g = a * d; >> >> when computing SCEV(g), (if I got it right) it is actually computing: >> >> SCEV(g) = getMulExpr(b , SCEV(c), SCEV(d)) >> >> There is a lack of symmetry for which I can't see the rational. I >> would expect one of these three possibilities: >> >> 1) Just using the SCEV of the operands: SCEV(g) = getMulExpr(SCEV(a), >> SCEV(d)); >> >> 2) Bei...
2016 Aug 03
6
[SCEV] getMulExpr could be extremely slow when creating SCEVs for a long chain of add/mul instructions
Hi, I'm working on a slow-compile problem caused by SCEV (PR28830), and I need your suggestions on how to fix it. The loop below causes ScalarEvolution::getMulExpr to hang. int get(unsigned n) { unsigned i, j, mult = 1; for (i = 0; i < 1; i++) { for (j = 0; j < 30; j++) { mult *= n++; } } return mult; } the inner loop is completed unrolled (by 30) to a long chain of "add" and "mult" instr...
2013 Nov 16
0
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
> On Nov 16, 2013, at 4:11 AM, Renato Golin <renato.golin at linaro.org> wrote: > >> On 16 November 2013 06:56, Andrew Trick <atrick at apple.com> wrote: >> - getMulExpr constructs a new AddRec with NSW: >> >> Flags = AddRec->getNoWrapFlags(clearFlags(Flags, SCEV::FlagNW)); >> const SCEV *NewRec = getAddRecExpr(NewOps, AddRecLoop, Flags); > > Hi Andrew, > > Thanks for looking at this. > > Clearing the flags her...
2012 Oct 08
3
[LLVMdev] SCEV bottom value
I'd like a value, call it Bottom, such that SE->getAddExpr(Bottom, X) => Bottom SE->getMulExpr(Bottom, X,) => Bottom isKnownPredicate(any, Bottom, X) => false etc. I can write code to make NULL work like I want, but it would be simpler if something was already defined. I'm wondering about SCEV::Unknown. The documentation suggests I could perhaps use it for a "bottom" v...
2012 Oct 08
0
[LLVMdev] SCEV bottom value
On Sun, 7 Oct 2012 18:53:59 -0700 Preston Briggs <preston.briggs at gmail.com> wrote: > I'd like a value, call it Bottom, such that > > SE->getAddExpr(Bottom, X) => Bottom > SE->getMulExpr(Bottom, X,) => Bottom > isKnownPredicate(any, Bottom, X) => false > etc. > > > I can write code to make NULL work like I want, but it would be > simpler if something was already defined. I'm wondering about > SCEV::Unknown. The documentation suggests I could perhap...
2012 Oct 08
1
[LLVMdev] SCEV bottom value
...st > Subject: Re: [LLVMdev] SCEV bottom value > > On Sun, 7 Oct 2012 18:53:59 -0700 > Preston Briggs <preston.briggs at gmail.com> wrote: > > > I'd like a value, call it Bottom, such that > > > > SE->getAddExpr(Bottom, X) => Bottom > > SE->getMulExpr(Bottom, X,) => Bottom > > isKnownPredicate(any, Bottom, X) => false > > etc. > > > > > > I can write code to make NULL work like I want, but it would be > > simpler if something was already defined. I'm wondering about > > SCEV::Unknown. The docu...
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>