Displaying 15 results from an estimated 15 matches for "getargno".
2013 Jan 31
3
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
...ttr I need to know the index of the Argument in the function?
I can follow the lead of this code from Core.cpp:
void LLVMAddAttribute(LLVMValueRef Arg, LLVMAttribute PA) {
Argument *A = unwrap<Argument>(Arg);
AttrBuilder B(PA);
A->addAttr(AttributeSet::get(A->getContext(), A->getArgNo() + 1, B));
}
Is this all I need? What does the A->getArgNo()+1 provide? The index of the argument in the function argument list+1?
Is this change to the API described anywhere?
Best,
.Chris.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list...
2013 Feb 05
0
[LLVMdev] Question about changes to llvm::Argument::addAttr(AttributeSet AS) API
...tion?
>
That's correct.
> I can follow the lead of this code from Core.cpp:
>
> void LLVMAddAttribute(LLVMValueRef Arg, LLVMAttribute PA) {
> Argument *A = unwrap<Argument>(Arg);
> AttrBuilder B(PA);
> A->addAttr(AttributeSet::get(A->getContext(), A->getArgNo() + 1, B));
> }
>
>
> Is this all I need? What does the A->getArgNo()+1 provide? The index of the argument in the function argument list+1?
>
Yes. :-) It's the index of the argument into the list. The indices go like this:
Index number
------------
0 <- The...
2017 Mar 20
4
[RFC] Attribute overhaul 2
LLVM's Attribute APIs need an overhaul.
Current problems
================
First, testing for an attribute on an Argument is slow.
llvm::AttributeSet::getAttributes(int) consumed 2% of cycles while
optimizing
llc during LTO. Our mid-level optimizations are constantly asking if a given
argument has some attribute (nonnull, dereferencable, etc), and this is
currently linear in the size of the
2016 Apr 26
2
Writing a pass to retrieve instruction operand value
Hi Everyone,
I asked a question on the dev list related to the topic to which John
Criswell and Jeremy Lakeman kindly provided some valuable insight.
I'm still stuck on the issue and i'm hoping i didn't phrase the question
well enough.
I have a *foo.c* file that is :
*#include <stdio.h>*
*int foo(int a, int b){*
* return a+b;*
*}*
*int main() {*
*int x=foo(3,1); *
2015 Dec 03
3
Function attributes for LibFunc and its impact on GlobalsAA
----- Original Message -----
> From: "James Molloy via llvm-dev" <llvm-dev at lists.llvm.org>
> To: "Vaivaswatha Nagaraj" <vn at compilertree.com>
> Cc: "LLVM Dev" <llvm-dev at lists.llvm.org>
> Sent: Thursday, December 3, 2015 4:41:46 AM
> Subject: Re: [llvm-dev] Function attributes for LibFunc and its impact on GlobalsAA
>
>
2015 Jan 21
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...attribute,
> + // because things can't escape through scalars without us seeing a
> + // cast, and thus, interaction with them doesn't matter.
> + if (!Arg->hasNoAliasAttr() && Arg->getType()->isPointerTy())
> return argNumberToAttrIndex(Arg->getArgNo());
> return NoneType();
> }
>
> when we do see the inttoptr case, we add an edge from the source to the
> destination.
Correct.
> If we've not noted potential aliasing of the non-pointer-typed argument,
> then does this end up looking like a unique global?
>
No...
2015 Jan 23
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...he argument attribute,
> + // because things can't escape through scalars without us seeing a
> + // cast, and thus, interaction with them doesn't matter.
> + if (!Arg->hasNoAliasAttr() && Arg->getType()->isPointerTy())
> return argNumberToAttrIndex(Arg-> getArgNo());
> return NoneType();
> }
>
> when we do see the inttoptr case, we add an edge from the source to
> the destination.
>
>
> Correct.
>
>
> If we've not noted potential aliasing of the non-pointer-typed
> argument, then does this end up looking like a...
2015 Jan 21
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
Updated testcases to have MayAlias/note issues as FIXME.
On Tue Jan 20 2015 at 3:54:10 PM Hal Finkel <hfinkel at anl.gov> wrote:
> ----- Original Message -----
> > From: "Daniel Berlin" <dberlin at dberlin.org>
> > To: "Hal Finkel" <hfinkel at anl.gov>
> > Cc: "Jiangning Liu" <Jiangning.Liu at arm.com>, "George
2015 Jan 15
3
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
On Thu, Jan 15, 2015 at 1:26 PM, Nick Lewycky <nlewycky at google.com> wrote:
> On 15 January 2015 at 13:10, Daniel Berlin <dberlin at dberlin.org> wrote:
>
>> Yes.
>> I've attached an updated patch that does the following:
>>
>> 1. Fixes the partialalias of globals/arguments
>> 2. Enables partialalias for cases where nothing has been unified to
2015 Jan 23
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...gt; + // because things can't escape through scalars without us seeing a
>>> + // cast, and thus, interaction with them doesn't matter.
>>> + if (!Arg->hasNoAliasAttr() && Arg->getType()->isPointerTy())
>>> return argNumberToAttrIndex(Arg-> getArgNo());
>>> return NoneType();
>>> }
>>>
>>> when we do see the inttoptr case, we add an edge from the source to
>>> the destination.
>>>
>>>
>>> Correct.
>>>
>>>
>>> If we've not noted potentia...
2015 Jan 23
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...he argument attribute,
> + // because things can't escape through scalars without us seeing a
> + // cast, and thus, interaction with them doesn't matter.
> + if (!Arg->hasNoAliasAttr() && Arg->getType()->isPointerTy())
> return argNumberToAttrIndex(Arg-> getArgNo());
> return NoneType();
> }
>
> when we do see the inttoptr case, we add an edge from the source to
> the destination.
>
>
> Correct.
>
>
> If we've not noted potential aliasing of the non-pointer-typed
> argument, then does this end up looking like a...
2015 Jan 24
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...ibute,
> > + // because things can't escape through scalars without us seeing a
> > + // cast, and thus, interaction with them doesn't matter.
> > + if (!Arg->hasNoAliasAttr() && Arg->getType()->isPointerTy())
> > return argNumberToAttrIndex(Arg-> getArgNo());
> > return NoneType();
> > }
> >
> > when we do see the inttoptr case, we add an edge from the source to
> > the destination.
> >
> >
> > Correct.
> >
> >
> > If we've not noted potential aliasing of the non-pointer-typed
>...
2015 Jan 26
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...things can't escape through scalars without us seeing
> > > a
> > > + // cast, and thus, interaction with them doesn't matter.
> > > + if (!Arg->hasNoAliasAttr() && Arg->getType()->isPointerTy())
> > > return argNumberToAttrIndex(Arg-> getArgNo());
> > > return NoneType();
> > > }
> > >
> > > when we do see the inttoptr case, we add an edge from the source to
> > > the destination.
> > >
> > >
> > > Correct.
> > >
> > >
> > > If we've no...
2015 Jan 15
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...ld have the argument attribute,
+ // because things can't escape through scalars without us seeing a
+ // cast, and thus, interaction with them doesn't matter.
+ if (!Arg->hasNoAliasAttr() && Arg->getType()->isPointerTy())
return argNumberToAttrIndex(Arg->getArgNo());
return NoneType();
}
@@ -991,10 +998,6 @@ CFLAliasAnalysis::query(const AliasAnalysis::Location &LocA,
auto SetA = *MaybeA;
auto SetB = *MaybeB;
-
- if (SetA.Index == SetB.Index)
- return AliasAnalysis::PartialAlias;
-
auto AttrsA = Sets.getLink(SetA.Index).Attrs;
auto...
2015 Jan 14
3
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
Oh, sorry, i didn't rebase it when i changed the fix, you would have had to
apply the first on top of the second.
Here is one against HEAD
On Wed, Jan 14, 2015 at 12:32 PM, Ana Pazos <apazos at codeaurora.org> wrote:
> Daniel, your patch does not apply cleanly. Are you on the tip?
>
> The code I see there is no line if (QueryResult == MayAlias|| QueryResult == PartialAlias)