Displaying 20 results from an estimated 700 matches similar to: "Why LLVM cannot optimize this?"
2016 Mar 02
2
Why LLVM cannot optimize this?
Hi,
Yes SCEV is pretty limited on this aspect.
This kind of code can trigger LLVM to explode in time/memory: https://llvm.org/bugs/show_bug.cgi?id=18606 <https://llvm.org/bugs/show_bug.cgi?id=18606>
See also this llvm-dev thread: SCEV implementation and limitations, do we need "pow"? : http://lists.llvm.org/pipermail/llvm-dev/2014-February/070062.html
CC: Sanjoy who may have an
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
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:
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 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 'sext' it works, but
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
2012 Apr 25
0
[LLVMdev] About Scalar Evolution Pass and SCEVAddRecExpr
Hi,
You may try function "getSCEVAtScope" of the ScalarEvolution analysis:
/// getSCEVAtScope - Return a SCEV expression for the specified value
/// at the specified scope in the program. The L value specifies a loop
/// nest to evaluate the expression at, where null is the top-level or a
/// specified loop is immediately inside of the loop.
///
/// This method can be used to compute
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
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 all,
>>
>> What is the best way to get the symbolic
2001 Sep 05
2
Replacing NAs with interpolated values
Hi there,
I've got this vector:
-84 -87 -90 -90 -89 -86 NA NA NA NA NA NA NA NA NA NA NA NA -96
-99 -100 -99 -96 -92 -89 -87 -87 -88 -90 -92 -94 -95 -96
-97 -97 -97 -96 -95
Is there a function in R which replaces the NAs with "interpolated"
values between -86 and -96?
Thanks, Sven
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
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 Mar 24
3
[LLVMdev] RFC: Loop versioning for LICM
> On Mar 20, 2015, at 8:02 PM, Nema, Ashutosh <Ashutosh.Nema at amd.com> wrote:
>
> > Yes, this is what I was proposing above and here ;):
> Thanks Adam it’s for confirming J
NP :).
>
> > No, not hasLoopInvariantStore but hasAccessToLoopInvariantAddress.
> Its only for invariant stores[not loads], Using ‘hasLoopInvariantStore’ (or a name with invariant store)
2014 Apr 22
2
[LLVMdev] SCEV and induction variable identification
Hi Fellows,
The goal is to find the induction variable for a loop, where the
induction variable increments with the multiplication, division or shift
operations, like this one:
sz = 8;
do {
... ...
sz = sz / 2;
} while (sz)
Is SCEV capable 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
2005 Jul 28
2
[LLVMdev] help with pointer-to-array conversion
I now understand that IndVarSimplify.cpp is capable of reproducing array
references when the pointer initialization from the array address is found
inside the immediately enclosing loop, such that in the following code:
int A[20000], B[100], Z;
int main()
{
int i, j, *a, *b;
for ( a = &A[0], i = 0; i != 200; i++ )
for ( b = &B[0], j = 0; j != 100; j++
2005 Jan 27
1
computing roots of bessel function
I am not yet a R user but I will be soon.
I am looking for the R command and syntax to compute the roots of Bessel
function i.e. computing the z values that lead to Jnu(z)=0 where J is a
Bessel function or order nu.
May You help me ?
thanks in advance.
Dr Catherine COUTAND
Institut National de la Recherche Agronomique (INRA)
umr Physiologie Int?grative de l'Arbre Fruitier et Forestier
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
2015 Jan 15
4
[LLVMdev] confusion w.r.t. scalar evolution and nuw
I've been doing some digging in this area (scev, wrapping arithmetic),
learning as much as I can, and have reached a point where I'm fairly
confused about the semantics of nuw in scalar evolution expressions.
Consider the following program:
define void @foo(i32 %begin) {
entry:
br label %loop
loop:
%idx = phi i32 [ %begin, %entry ], [ %idx.dec, %loop ]
%idx.dec = sub nuw i32
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
2015 Jun 10
3
[LLVMdev] Question about NoWrap flag for SCEVAddRecExpr
I am testing vectorization on the following test 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