search for: noalia

Displaying 20 results from an estimated 880 matches for "noalia".

Did you mean: noalias
2012 Sep 21
3
[LLVMdev] Alias Analysis accuracy
On Fri, Sep 21, 2012 at 3:08 PM, Welson Sun <welson.sun at gmail.com> wrote: > OK, with the restrict type qualifier, it is a little bit better: > > The IR's function signature becomes: > define void @foo(i32* noalias %a, i32* noalias %b, i32* noalias %c) nounwind > { > > Now the AA result: > Function: foo: 13 pointers, 0 call sites > NoAlias: i32* %a, i32* %b > NoAlias: i32* %a, i32* %c > NoAlias: i32* %b, i32* %c > NoAlias: i32* %a, i32** %a_addr > NoAl...
2012 Sep 21
0
[LLVMdev] Alias Analysis accuracy
Here is the result of running mem2reg then basicaa, it is even worse: (%a should be alias to %0, and partial alias to %3) opt -mem2reg -basicaa -aa-eval -print-all-alias-modref-info < foo.s > /dev/null Function: foo: 6 pointers, 0 call sites NoAlias: i32* %a, i32* %b NoAlias: i32* %a, i32* %c NoAlias: i32* %b, i32* %c PartialAlias: i32* %1, i32* %a NoAlias: i32* %1, i32* %b NoAlias: i32* %1, i32* %c NoAlias: i32* %4, i32* %a PartialAlias: i32* %4, i32* %b NoAlias: i32* %4, i32* %c NoAlias:...
2012 Sep 21
0
[LLVMdev] Alias Analysis accuracy
OK, with the restrict type qualifier, it is a little bit better: The IR's function signature becomes: define void @foo(i32* noalias %a, i32* noalias %b, i32* noalias %c) nounwind { Now the AA result: Function: foo: 13 pointers, 0 call sites NoAlias: i32* %a, i32* %b NoAlias: i32* %a, i32* %c NoAlias: i32* %b, i32* %c NoAlias: i32* %a, i32** %a_addr NoAlias: i32* %b, i32** %a_addr NoAlias:...
2012 Sep 21
3
[LLVMdev] Alias Analysis accuracy
...[mailto:llvmdev-bounces at cs.uiuc.edu] *On > Behalf Of *Welson Sun > *Sent:* Friday, September 21, 2012 5:50 PM > *To:* Krzysztof Parzyszek > *Cc:* llvmdev at cs.uiuc.edu > *Subject:* Re: [LLVMdev] Alias Analysis accuracy**** > > ** ** > > Yeah. Is there a way to specify noalias between these arguments?**** > > On Fri, Sep 21, 2012 at 2:46 PM, Krzysztof Parzyszek < > kparzysz at codeaurora.org> wrote:**** > > On 9/21/2012 4:35 PM, Welson Sun wrote:**** > > Dear LLVM, > > I would like to understand how to improve the LLVM alias analysis &gt...
2009 Oct 02
1
[LLVMdev] alias analysis and functions
Hi, I am trying to use alias analysis (Anderson) and noticed that for pointers to functions I don't get the expected result: a pointer that clearly may point to a function is reported as NoAlias. I use -anders-aa -aa-eval -print-no-aliases -print-may-aliases -print-must-aliases Here is a test case: ///////////////try_calls_aliases.c #include <stdio.h> typedef int (*PF)(); PF pf01=0; PF pf2=0; int pointed_to_function0() { printf("pointed_to_function0\n"); retur...
2020 Sep 29
5
restrict func param losing noalias when inlined
Johannes, Thanks, I have been following along some of the thread(s) and the phab reviews. The scope of this work is more encompassing than our current needs and I've looked at trying to carve a piece out. It's not clear to me what purpose the llvm.noalias intrinsic serves right now. Also, if a mem instruction has !noalias metadata, then it should not be aliased, but I must be missing some complexity. For example, if you look at the alias of two memory locations and they are both tagged with noalias MD, that should be safe to NoAlias providing they...
2012 Sep 21
3
[LLVMdev] Alias Analysis accuracy
...; preds = %bb2 ret void } Now run: opt -basicaa -aa-eval -print-all-alias-modref-info < foo.s > /dev/null, you get this: Function: _Z3fooPiS_S_: 13 pointers, 0 call sites MayAlias: i32* %a, i32* %b MayAlias: i32* %a, i32* %c MayAlias: i32* %b, i32* %c NoAlias: i32* %a, i32** %a_addr NoAlias: i32* %b, i32** %a_addr NoAlias: i32* %c, i32** %a_addr NoAlias: i32* %a, i32** %b_addr NoAlias: i32* %b, i32** %b_addr NoAlias: i32* %c, i32** %b_addr NoAlias: i32** %a_addr, i32** %b_addr NoAlias: i32* %a, i32*...
2013 May 26
2
[LLVMdev] Mixing noalias and regular arguments
...w, I had this patch starred but hadn't got around to it. Yes, the rationale and implementation are correct. > (Is there a code owner for AA, btw?) (It falls back on the more general code owner who is Chris Lattner in this case, "Everything not covered by someone else".) +/// isNoAliasArgument - Return true if this is an argument with the noalias +/// attribute. +bool isNoAliasArgument(const Value* V); "const Value* V" should be "const Value *V". + // Arguments can't alias with noalias arguments + if ((isa<Argument>(O1) && isNoAliasA...
2014 Nov 14
2
[LLVMdev] Upcoming Changes/Additions to Scoped-NoAlias metadata
...arruth" <chandlerc at google.com> > To: "Hal Finkel" <hfinkel at anl.gov> > Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Sent: Thursday, November 13, 2014 7:02:58 PM > Subject: Re: [LLVMdev] Upcoming Changes/Additions to Scoped-NoAlias metadata > > > > > > On Thu, Nov 13, 2014 at 4:44 PM, Hal Finkel < hfinkel at anl.gov > > wrote: > > > After discussing this with Chandler offline last week, here's the > proposed solution: instead of having both !alias.scope and !noalias > meta...
2018 Apr 25
2
Help on understanding assume shape array processing and array descriptors in LLVM IR
...N) :: Li,Lj INTEGER, INTENT(IN) :: Istr, Iend, Jstr,Jend INTEGER :: i, j REAL*8, INTENT(INOUT) :: a(Li:,Lj:) REAL*8, INTENT(IN) :: b(Li:,Lj:) --snip-- I got the below LLVM IR, the parameters received. --snip-- ; Function Attrs: norecurse nounwind define void @test_(i64* noalias nocapture %a, i64* noalias nocapture readonly %b, i64* noalias nocapture readonly %li, i64* noalias nocapture readonly %lj, i64* noalias nocapture readonly %istr, i64* noalias nocapture readonly %iend, i64* noalias nocapture readonly %jstr, i64* noalias nocapture readonly %jend, i64* noalias nocap...
2013 Nov 04
3
[LLVMdev] [RFC] Scoped no-alias metadata (redux)
...n December, I had started a thread on scoped no-alias metadata in order to represent C99 'restrict' pointer information at the IR level: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056586.html At this point, we also have another important use case: preserving the existing 'noalias' attributes on pointers after inlining. My original proposal was technically flawed, and based on the original feedback, and subsequent discussions with Arnold and Andy, a new scheme has emerged: First, we'll add some metadata to define a hierarchy of scopes. For preserving noalias during...
2010 Feb 14
0
[LLVMdev] A very basic doubt about LLVM Alias Analysis
Hi Ambika, > Oh m sorry for that mistake as I had points to in mind. > But still what about the following prog: > > int main() > { > int *i,*j,k; > i=&k; > j=&k; > k=4; > printf("%d,%d,%d",*i,*j,k); > return 0; > } > > > here too i dont get <i,j> alias each other. how are you
2013 May 27
2
[LLVMdev] Mixing noalias and regular arguments
Kuperstein, Michael M wrote: > Thanks Nick! > > Can you just check sanity before I commit? > (Or suggest a better name for the function...) Sure! +static bool canNotAliasDiffArgument(const Value *V) +{ + return (isa<AllocaInst>(V) || isNoAliasCall(V) || isNoAliasArgument(V)); +} Extra parens? The name "canNotAliasDiffArgument" works, but it's named for what we need the function to do in its sole caller. Thinking about what it does without a specific caller in mind, I might think of "noaliasAtFunctionEntry",...
2013 May 27
0
[LLVMdev] Mixing noalias and regular arguments
Thanks Nick! Can you just check sanity before I commit? (Or suggest a better name for the function...) -----Original Message----- From: Nick Lewycky [mailto:nicholas at mxc.ca] Sent: Sunday, May 26, 2013 09:54 To: Kuperstein, Michael M Cc: LLVMdev at cs.uiuc.edu Subject: Re: [LLVMdev] Mixing noalias and regular arguments Kuperstein, Michael M wrote: > Ping? Pong! Sorry for the slow review, I had this patch starred but hadn't got around to it. Yes, the rationale and implementation are correct. > (Is there a code owner for AA, btw?) (It falls back on the more general code owner wh...
2007 Aug 19
2
[LLVMdev] c const
...LLVM that array bounds are really constant that would presumably >> solve the problem. The benefits of a const * __restrict come from two different places. The const part is essentially enforced by the front-end and the restrict part is used to inform the alias analysis (it becomes a noalias parameter attribute). The noalias parameter attribute may be of use to you eventually, but full noalias implementation isn't yet complete. Specifically the case where a function with noalias parameter attributes is inlined does not currently preserve the noalias information. > Here...
2018 Aug 17
2
local restrict - again
...018 10:59 AM, Hal Finkel wrote: > Hi, Jeroen, > > We should move these conversations to llvm-dev so that they don't get > missed and others can contribute. Can I cc the list? [+llvm-dev] - Jeroen consented. > > Doing this will mean that the logic for when to remove dead llvm.noalias > intrinsics will become more complicated. That might be worthwhile. So > long as we can answer the basic question: > >   Given two memory accesses with the same noalias scope metadata, is one > pointer derived from a noalias intrinic with the right scope and the > other not so d...
2017 Sep 14
2
[RFC] noalias intrinsic
Hello, Currently the noalias attribute can be applied on function parameters and return value, or via scoped alias on store. The problem is that there is no easy way to apply the noalias attribute on a pointer that is loaded indirectly (e.g from the field of an aggregate, or from a memory location - though for this you can s...
2017 Apr 12
2
Potential issue with noalias @malloc and @realloc
...es that is compatible with all the random babble >> > standards have written down :) >> > For now, the only sane solution IMHO, is to say that no alias implies >> > pointer inequality, regardless of the standards. Because the above can >> > occur in any situation noalias exists but they are allowed to be pointer >> > equal (as mentioned, it's trivial to make this happen in TBAA). >> >> Just to be clear, you're suggesting that we no longer mark malloc's >> return value as noalias? >> > > Actually, i'd suggest j...
2013 May 27
0
[LLVMdev] Mixing noalias and regular arguments
Regarding the name, I'm not sure noaliasAtFunctionEntry makes sense, for two reasons: a) The pointer involved may not be defined at entry. b) We already have something which is similar in spirit - IsIdentifiedObject. That covers the 3 cases I have in the new function, but also two additional ones: GlobalValues which are not GlobalAlias...
2015 Jun 18
3
[LLVMdev] problem with replacing an instruction
I am trying to change this define void @main(float* noalias %arg0, float* noalias %arg1, float* noalias %arg2) { entrypoint: %0 = bitcast float* %arg1 to <4 x float>* intothis define void @main(float* noalias %arg0, float* noalias %arg1, float* noalias %arg2) { entrypoint: %0 = getelementptr float* %arg1, i64 0 %1 = bitcast float* %0 to...