Displaying 20 results from an estimated 94 matches for "addrecs".
Did you mean:
addrec
2010 Jun 29
2
[LLVMdev] Confuse on getSCEVAtScope
hi all,
i have SCEVAddRec
{{(32 + @edge.8265),+,32}<Loop0>,+,4}<Loop1>
where Loop0 and Loop1 are brothers (loops at the same level of the
loopnest), and Loop0 have a computable backedge taken count.
when i call getSCEVAtScope({{(32 +
@edge.8265),+,32}<Loop0>,+,4}<Loop1> , Loop1), it just give me a
{{(32 + @edge.8265),+,32}<Loop0>,+,4}<Loop1>,
instead of
2011 May 01
0
[LLVMdev] ScalarEvolution::getSVECAtScope
Hi,
Is it valid to query ScalarEvolution::getSCEVAtScope 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
2011 May 01
0
[LLVMdev] ScalarEvolution::getSVECAtScope
Nevermind. I misread the documentation.
On Sat, Apr 30, 2011 at 8:12 PM, Thomas Jablin <tjablin at gmail.com> wrote:
> Hi,
>
> Is it valid to query ScalarEvolution::getSCEVAtScope 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
2013 Nov 13
2
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
Hi folks,
I'm trying to analyse this piece of IR:
for.body: ; preds = %for.body,
%entry
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%0 = shl nsw i64 %indvars.iv, 1
%arrayidx = getelementptr inbounds i32* %b, i64 %0
%1 = load i32* %arrayidx, align 4, !tbaa !1
%add = add nsw i32 %1, %I
%arrayidx3 = getelementptr
2016 Apr 23
2
[IndVarSimplify] Narrow IV's are not eliminated resulting in inefficient code
Hi Sanjoy,
Thank you for looking into this!
Yes, your patch does fix my larger test case too. My algorithm gets double
performance improvement with the patch, as the loop now has a smaller
instruction set and succeeds to unroll w/o any extra #pragma's.
I also ran the LLVM tests against the patch. There are 6 new failures:
Analysis/LoopAccessAnalysis/number-of-memchecks.ll
2013 Nov 16
0
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
On Nov 13, 2013, at 3:39 AM, Renato Golin <renato.golin at linaro.org> wrote:
> Hi folks,
>
> I'm trying to analyse this piece of IR:
>
> for.body: ; preds = %for.body, %entry
> %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
> %0 = shl nsw i64 %indvars.iv, 1
> %arrayidx = getelementptr inbounds
2016 Apr 20
2
[IndVarSimplify] Narrow IV's are not eliminated resulting in inefficient code
Hi,
Would you be able to kindly check and assist with the IndVarSimplify / SCEV
problem I got in the latest LLVM, please?
Sometimes IndVarSimplify may not eliminate narrow IV's when there actually
exists such a possibility. This may affect other LLVM passes and result in
inefficient code. The reproducing test 'indvar_test.cpp' is attached.
The problem is with the second
2012 Sep 19
2
[LLVMdev] sign extensions, SCEVs, and wrap flags
On Tue, Sep 18, 2012 at 10:59 PM, Andrew Trick <atrick at apple.com> wrote:
>
> On Sep 18, 2012, at 8:21 PM, Preston Briggs <preston.briggs at gmail.com>
> wrote:
>
> Given the following SCEV,
>
> *(sext i32 {2,+,1}<nw><%for.body> to i64)*
>
>
> from the following C source,
>
> *void strong3(int *A, int *B, int n) {*
> * for (int i =
2016 Aug 03
6
[SCEV] getMulExpr could be extremely slow when creating SCEVs for a long chain of add/mul instructions
...}
return mult;
}
the inner loop is completed unrolled (by 30) to a long chain of "add" and "mult" instructions, then indvars follows loop-unroll and triggers SCEV creations for this long instruction chain. When it comes to getMulExpr, it tries to fold multiplications of AddRecs of the same induction variable recursively, this could be very slow if the expression tree is deep.
Code responsible for this problem starts here (in ScalarEvolution.cpp):
// Okay, if there weren't any loop invariants to be folded, check to see if
// there are multiple AddRec's wit...
2010 Jun 29
0
[LLVMdev] Confuse on getSCEVAtScope
On 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.
>
2012 Dec 18
2
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
Dan,
Thanks for the response ...
On 12/17/2012 1:53 PM, Dan Gohman wrote:
> On Mon, Dec 10, 2012 at 2:13 PM, Matthew Curtis <mcurtis at codeaurora.org> wrote:
>> Hello all,
>>
>> I wanted to get some feedback on this patch for ScalarEvolution.
>>
>> It addresses a performance problem I am seeing for simple benchmark.
>>
>> Starting with this C
2018 Jan 25
1
Late setting of SCEV NoWrap flags does bad with cache
...: Thursday, 25 January 2018 at 06:03
To: "llvm-dev at lists.llvm.org" <llvm-dev at lists.llvm.org>
Subject: [llvm-dev] Late setting of SCEV NoWrap flags does bad with cache
Hello Everyone,
I want to raise a discussion about reasonability of late setting of nsw/nuw/nw flags to SCEV AddRecs through setNoWrapFlags method. A discussion about this have already happened in August last year, there was a concern about different no-wrap flags that come from different sequences of SCEV flags invocations. It was mentioned there that late setting of flags is actually a hack to save some compile...
2018 Jan 25
2
Late setting of SCEV NoWrap flags does bad with cache
Hello Everyone,
I want to raise a discussion about reasonability of late setting of nsw/nuw/nw flags to SCEV AddRecs through setNoWrapFlags method. A discussion about this have already happened in August last year, there was a concern about different no-wrap flags that come from different sequences of SCEV flags invocations. It was mentioned there that late setting of flags is actually a hack to save some compile...
2012 Sep 20
0
[LLVMdev] sign extensions, SCEVs, and wrap flags
On Sep 19, 2012, at 2:18 PM, Preston Briggs <preston.briggs at gmail.com> wrote:
> On Tue, Sep 18, 2012 at 10:59 PM, Andrew Trick <atrick at apple.com> wrote:
>
> On Sep 18, 2012, at 8:21 PM, Preston Briggs <preston.briggs at gmail.com> wrote:
>
>> Given the following SCEV,
>>
>> (sext i32 {2,+,1}<nw><%for.body> to i64)
>>
2012 Dec 18
0
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
On Tue, Dec 18, 2012 at 9:56 AM, Matthew Curtis <mcurtis at codeaurora.org> wrote:
>
> Here's how I'm evaluating the expression (in my head):
>
> 00: Add(ZeroExtend(Truncate(Minus(AddRec(Start=0,Step=3)[n],3), i8), i32),3)
> |
> 01: Add(ZeroExtend(Truncate(Minus(AddRec(Start=0,Step=3)[0],3), i8), i32),3)
>
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]
Sent: Thursday, March 19, 2015 1:02 PM
To: Nema, Ashutosh
Cc:
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
2018 Feb 08
2
[SCEV] Inconsistent SCEV formation for zext
...Negative step causes unsigned wrap, but it
// still can't self-wrap.
const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNW);
// Return the expression with the addrec on the outside.
return getAddRecExpr(
getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this,
Depth + 1),
getSignExtendExpr(Step, Ty, Depth + 1), L,
AR->getNoWrapFlags());
}
I believe it is wrong for ScalarEvolution to use a simplified SCEV for i...
2012 Sep 19
2
[LLVMdev] sign extensions, SCEVs, and wrap flags
Given the following SCEV,
*(sext i32 {2,+,1}<nw><%for.body> to i64)*
from the following C source,
*void strong3(int *A, int *B, int n) {*
* for (int i = 0; i < n; i++) {*
* A[i + 2] = i;*
* ...*
* }*
*}*
Since the No-Wrap flag is set on the addrec, can't I safely rewrite it as
*{2,+,1}<nw><%for.body>*
If I can, why isn't the SCEV package
2020 Jul 30
2
Normalize a SCEV Expression
Hi,
I have a SCEV like this: {16,+,8}. Say that this came from a loop like:
int64_t *p;
for (int64_t i = 0; i < ...; ++i)
p[i+2]...
And assuming that I'm on a 64-bit machine. What I would like to do is
normalize it
like that, basically this: {2,+,1} i.e. map it to the index.
Now, I tried to get the underlying element size of the pointer, then
getUDivExpr(OriginalSCEV, ElementSize); But