Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] SCEV not simplifying"
2012 Jun 18
0
[LLVMdev] SCEV not simplifying
Hi,
So SCEV cannot simplify that expression to -1 because of overflow issues
(take e.g. src=0x7FFF..).
If you compile with 64 bits integers, then the sexts disappear and so SCEV
can do the simplification.
Depending on what you want to do, you may want to either do not extend src
and dst to 64 bits or add a NSW flag to the computations. That will
hopefully make SCEV push the sext outside and
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 =
2012 Sep 20
3
[LLVMdev] sign extensions, SCEVs, and wrap flags
On Wed, Sep 19, 2012 at 6:30 PM, Andrew Trick <atrick at apple.com> wrote:
>
> 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:
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 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
2012 Sep 19
0
[LLVMdev] sign extensions, SCEVs, and wrap flags
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 = 0; i < n; i++) {
> A[i + 2] = i;
> ...
> }
> }
>
> Since the No-Wrap flag is
2018 Jan 26
2
Late setting of SCEV NoWrap flags does bad with cache
Thanks for your insides Sanjoy!
I don't really believe that option 2 may work just because even if we recalculate the range for this add recurrency, there are already its derivatives with cached ranges (the most obvious example is sext and expressions where this sext is involved). We can speculate about what is "simple enough" to not cache the ranges, but I believe that there is
2018 Jan 26
0
Late setting of SCEV NoWrap flags does bad with cache
On Thu, Jan 25, 2018 at 9:55 PM, Maxim Kazantsev <max.kazantsev at azul.com> wrote:
> I don't really believe that option 2 may work just because even if we recalculate the range for this add recurrency, there are already its derivatives with cached ranges (the most obvious example is sext and expressions where this sext is involved). We can speculate about what is "simple
2018 Jan 26
0
Late setting of SCEV NoWrap flags does bad with cache
Hi Max,
On Wed, Jan 24, 2018 at 10:03 PM, Maxim Kazantsev via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> 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
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
2012 Nov 02
2
[LLVMdev] DependenceAnalysis and PR14241
On 11/02/2012 10:21 AM, Preston Briggs wrote:
>
> My initial guess is that a conservative fix is quick and small (make
> sure the underlying pointers are loop invariant, otherwise give up). A
> better approach would be to somehow turn code like the example into
> array references that can be analyzed. I'll need to think about this and
> do some reading.
Hi Preston,
I looked
2012 Nov 02
2
[LLVMdev] DependenceAnalysis and PR14241
On 11/02/2012 11:02 AM, Hal Finkel wrote:
> ----- Original Message -----
>> From: "Tobias Grosser" <tobias at grosser.es>
>> To: "preston briggs" <preston.briggs at gmail.com>
>> Cc: "Benjamin Kramer" <benny.kra at gmail.com>, "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
>> Sent: Friday, November
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
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
2012 Sep 20
0
[LLVMdev] sign extensions, SCEVs, and wrap flags
Hi,
> Sorry, I probably led you astray. No-self-wrap is useful for determining
> trip count, but does not mean that sign/zero extension can be hoisted.
>
> But if you run your analysis after -indvars, the sign-extension should be
> removed if possible. The algorithm walks the derived induction variables
> specifically looking for add nsw/nuw and replacing
2012 Nov 02
0
[LLVMdev] DependenceAnalysis and PR14241
Here's the current code (abstracted a bit)
const Instruction *Src,
const Instruction *Dst,
// make sure they are loads and stores, then
const Value *SrcPtr = getPointerOperand(Src); // hides a little
casting, then Src->getPointerOperand
const Value *DstPtr = getPointerOperand(Dst); // ditto
// see how underlying objects alias, then
const GEPOperator *SrcGEP =
2012 Jun 20
2
[LLVMdev] another SCEV surprise
When compile the following case and look at the SCEV analysis, I notice
that the first two loops don't have a LoopInvariantBackedgeTakenCount
(surprising) and the last one does (not surprising, except in the context
of the first two examples).
*void p4(int *A, int *B, long int n) {*
* for (char i = 0; i < n; i++) {*
* A[i + 2] = i;*
* *B++ = A[i];*
* }*
*}*
*
*
*void p5(int *A, int
2016 Sep 16
4
SCEV cannot compute the trip count of Simple loop
Hi Deepali,
SCEV reports the backedge taken count as "((-1 * (sext i32 (3 + %x) to
i64))<nsw> + ((sext i32 (3 + %x) to i64) smax (sext i32 (6 + %x) to
i64)))", so symbolically it does have an answer.
Ideally SCEV should be able to exploit <nsw> on (3 + %x) and (6 + %x)
to fold the expression above to "3", but due to some systemic issues
SCEV can't exploit
2012 Oct 08
1
[LLVMdev] SCEV bottom value
Hi Preston,
I was wondering ... "Bottom" is a bit overloaded as far as terms go. Would SCEVNaN be a better name for this beast?
Sameer.
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
> Behalf Of Sameer Sahasrabuddhe
> Sent: Monday, October 08, 2012 9:16 AM
> To: preston.briggs at gmail.com
> Cc: LLVM
2012 Nov 02
0
[LLVMdev] DependenceAnalysis and PR14241
----- Original Message -----
> From: "Tobias Grosser" <tobias at grosser.es>
> To: "preston briggs" <preston.briggs at gmail.com>
> Cc: "Benjamin Kramer" <benny.kra at gmail.com>, "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Sent: Friday, November 2, 2012 12:56:53 PM
> Subject: Re: [LLVMdev]