Displaying 20 results from an estimated 7000 matches similar to: "[LLVMdev] SSA failed on alias"
2016 Jul 04
2
Optimization issues (Alias Analysis?)
Hey,
I am currently working on a VM which is based on LLVM and I would like to
use its optimizer, but it somehow it can't detect something very simple (I
guess.)
This is the LLVM IR:
target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
target triple = "i386-unknown-linux-gnu"
%struct.regs = type { i32, i32, i32 }
define void @Test(%struct.regs* noalias
2015 Mar 13
2
[LLVMdev] Alias analysis issue with structs on PPC
Hi,
I have the following C loop to vectorize:
struct box {
double* source;
};
void test(double* restrict result, struct box my_struct, int len)
{
for (int i=0 ; i<len; i++) {
result[i] = my_struct.source[i] * my_struct.source[i];
}
}
There are two references in the loop, result[i] (restrict) and
my_struct.source[i] (readonly). The compiler should easily figure out that
2015 Mar 13
2
[LLVMdev] Alias analysis issue with structs on PPC
On Fri, Mar 13, 2015 at 2:54 PM Daniel Berlin <dberlin at dberlin.org> wrote:
> On Fri, Mar 13, 2015 at 2:39 PM Olivier H Sallenave <ohsallen at us.ibm.com>
> wrote:
>
>> Hi,
>>
>> I have the following C loop to vectorize:
>>
>> struct box {
>> double* source;
>> };
>>
>> void test(double* restrict result, struct box
2009 Nov 13
1
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
Hans Wennborg wrote:
> After discussing with Nick Lewycky in the IRC channel, here comes a less
> aggressive patch.
>
> We were worried that a constant pointer could alias with a GlobalValue.
> Also, if one pointer could be a GlobalValue and the other a GlobalAlias
> with the GlobalValue as aliasee.
> However, I was not able to produce a test where this happens wihout the
2009 Nov 05
0
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
On Nov 4, 2009, at 6:43 AM, Hans Wennborg wrote:
> Here is another change I'd like to suggest to the BasicAliasAnalysis.
>
> LLVM fails to remove the dead store in the following code:
>
> %t = type { i32 }
>
> define void @f(%t* noalias nocapture %stuff ) {
> %p = getelementptr inbounds %t* %stuff, i32 0, i32 0
>
> store i32 1, i32* %p; <-- This
2009 Nov 12
0
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
After discussing with Nick Lewycky in the IRC channel, here comes a less
aggressive patch.
We were worried that a constant pointer could alias with a GlobalValue.
Also, if one pointer could be a GlobalValue and the other a GlobalAlias
with the GlobalValue as aliasee.
However, I was not able to produce a test where this happens wihout the
getUnderlyingObject() returning the same value.
It
2009 Nov 10
4
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
Dan Gohman wrote:
> On Nov 4, 2009, at 6:43 AM, Hans Wennborg wrote:
>
>> Here is another change I'd like to suggest to the BasicAliasAnalysis.
>>
>> LLVM fails to remove the dead store in the following code:
>>
>> %t = type { i32 }
>>
>> define void @f(%t* noalias nocapture %stuff ) {
>> %p = getelementptr inbounds %t* %stuff, i32 0,
2009 Nov 04
2
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
Here is another change I'd like to suggest to the BasicAliasAnalysis.
LLVM fails to remove the dead store in the following code:
%t = type { i32 }
define void @f(%t* noalias nocapture %stuff ) {
%p = getelementptr inbounds %t* %stuff, i32 0, i32 0
store i32 1, i32* %p; <-- This store is dead
%x = load i32* inttoptr (i32 12345 to i32*)
store i32 %x, i32* %p
ret
2015 Jun 15
2
[LLVMdev] Expressing ambiguous points-to info in AliasAnalysis::alias(...) results?
On Mon, Jun 15, 2015 at 11:02 AM, Daniel Berlin <dberlin at dberlin.org> wrote:
> Points-to analysis on LLVM-IR itself is fine (see the current CFL-AA,
> or the old deleted andersen's implementations), and giving may-alias
> and no-alias results also works. Giving must-alias answers, however,
> is difficult.
>
> In particular, i would not simply ignore some types of
2017 Jun 20
3
LoopVectorize fails to vectorize loops with induction variables with PtrToInt/IntToPtr conversions
On 06/20/2017 03:26 AM, Hal Finkel wrote:
> Hi, Adrien,
Hello Hal!
Thanks for your answer!
> Thanks for reporting this. I recommend that you file a bug report at
> https://bugs.llvm.org/
Will do!
> Whenever I see reports of missed optimization opportunities in the face
> of ptrtoint/inttoptr, my first question is: why are these instructions
> present in the first place? At
2010 Sep 09
2
[LLVMdev] SCEV Question
LLVM 2.7's ScalarEvolution.cpp has this scary comment:
// It's tempting to handle inttoptr and ptrtoint as no-ops, however this can
// lead to pointer expressions which cannot safely be expanded to GEPs,
// because ScalarEvolution doesn't respect the GEP aliasing rules when
// simplifying integer expressions.
I think I understand what the comment is saying. If a GEP has
2015 Mar 15
5
[LLVMdev] Alias analysis issue with structs on PPC
On Sun, Mar 15, 2015 at 4:34 PM Olivier Sallenave <ol.sall at gmail.com> wrote:
> Hi Daniel,
>
> Thanks for your feedback. I would prefer not to write a new AA. Can't we
> directly implement that traversal in BasicAA?
>
Can I ask why?
Outside of the "well, it's another pass", i mean?
BasicAA is stateless, so you can't cache, and you really don't
2011 Apr 20
0
[LLVMdev] GEP vs IntToPtr/PtrToInt
On Wed, Apr 20, 2011 at 8:08 AM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote:
> I have a question about when we should apply these pointer aliasing
> rules. Do the rules tell us when a load/store is safe?
> "Any memory access must be done through a pointer value associated
> with an address range of the memory access, otherwise the behavior is
> undefined."
>
2011 Apr 20
2
[LLVMdev] GEP vs IntToPtr/PtrToInt
On Wed, Apr 20, 2011 at 12:20 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Wed, Apr 20, 2011 at 8:08 AM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote:
>> I have a question about when we should apply these pointer aliasing
>> rules. Do the rules tell us when a load/store is safe?
>> "Any memory access must be done through a pointer value
2011 Apr 20
0
[LLVMdev] GEP vs IntToPtr/PtrToInt
On Wed, Apr 20, 2011 at 10:21 AM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote:
> On Wed, Apr 20, 2011 at 12:20 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>> On Wed, Apr 20, 2011 at 8:08 AM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote:
>>> I have a question about when we should apply these pointer aliasing
>>> rules. Do the rules tell
2009 Dec 14
4
[LLVMdev] inttoptr weirdness
Hi again.
I have a complex type system in my custom language that isn't easily
representable as LLVM IR types, so I figured I could mostly get along
with treating my types as i8* and doing the appropriate bitcasts and
inttoptr instructions, and doing pointer arithmetic myself (by casting
the pointers to ints, adding the appropriate byte offsets, and then
casting back to pointers).
However,
2012 Nov 09
3
[LLVMdev] inttoptr and basicaa
Hi,
I am observing some incorrect behavior in basicaa, wherein two pointers that
basicaa should determine to be MustAlias are ending up NoAlias - the other
extreme :(
I am blaming this on basicaa not handling inttoptr. Here is the relevant IR
snippet.
--------------------
%sunkaddr36 = ptrtoint %struct.BitParams* %bs to i32
%sunkaddr37 = add i32 %sunkaddr36, 16
%sunkaddr38 = inttoptr i32
2011 Apr 20
1
[LLVMdev] GEP vs IntToPtr/PtrToInt
On Wed, Apr 20, 2011 at 2:11 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Wed, Apr 20, 2011 at 10:21 AM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote:
>> On Wed, Apr 20, 2011 at 12:20 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>>> On Wed, Apr 20, 2011 at 8:08 AM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote:
>>>> I
2010 Sep 10
0
[LLVMdev] SCEV Question
On Sep 9, 2010, at 1:48 PM, David Greene wrote:
> LLVM 2.7's ScalarEvolution.cpp has this scary comment:
>
> // It's tempting to handle inttoptr and ptrtoint as no-ops, however this can
> // lead to pointer expressions which cannot safely be expanded to GEPs,
> // because ScalarEvolution doesn't respect the GEP aliasing rules when
> // simplifying integer
2016 Jan 07
2
[GlobalISel] A Proposal for global instruction selection
Hi David,
I had a quick look at the inttoptr/ptrtoint thing for GlobalISel and unless I am mistaken the semantic you want for such instructions do not match what the language reference says.
Indeed, you said that inttoptr instruction is not a no-op on your architecture, whereas the language reference says:
“The ‘inttoptr‘ instruction converts value to type ty2 by applying either a zero extension