Displaying 19 results from an estimated 19 matches for "hasnoaliasattr".
2009 Nov 10
4
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
...<Constant>(V1) && isa<PointerType>(V2->getType())) {
>> + while (const GEPOperator *g = dyn_cast<GEPOperator>(V2))
>> + V2 = g->getOperand(0);
>> +
>> + if (const Argument *A = dyn_cast<Argument>(V2))
>> + if (A->hasNoAliasAttr())
>> + return NoAlias;
>> + } else if (isa<Constant>(V2) && isa<PointerType>(V1->getType())) {
>> + while (const GEPOperator *g = dyn_cast<GEPOperator>(V1))
>> + V1 = g->getOperand(0);
>> +
>> + if (const Argume...
2009 Nov 05
0
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
...bute
> + if (isa<Constant>(V1) && isa<PointerType>(V2->getType())) {
> + while (const GEPOperator *g = dyn_cast<GEPOperator>(V2))
> + V2 = g->getOperand(0);
> +
> + if (const Argument *A = dyn_cast<Argument>(V2))
> + if (A->hasNoAliasAttr())
> + return NoAlias;
> + } else if (isa<Constant>(V2) && isa<PointerType>(V1->getType())) {
> + while (const GEPOperator *g = dyn_cast<GEPOperator>(V1))
> + V1 = g->getOperand(0);
> +
> + if (const Argument *A = dyn_cast<Argu...
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
2009 Nov 12
0
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
...&& isa<PointerType>(V2->getType())) {
>>> + while (const GEPOperator *g = dyn_cast<GEPOperator>(V2))
>>> + V2 = g->getOperand(0);
>>> +
>>> + if (const Argument *A = dyn_cast<Argument>(V2))
>>> + if (A->hasNoAliasAttr())
>>> + return NoAlias;
>>> + } else if (isa<Constant>(V2) && isa<PointerType>(V1->getType())) {
>>> + while (const GEPOperator *g = dyn_cast<GEPOperator>(V1))
>>> + V1 = g->getOperand(0);
>>> +
>>&g...
2009 Nov 13
1
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
...ointerType>(V2->getType())) {
>>>> + while (const GEPOperator *g = dyn_cast<GEPOperator>(V2))
>>>> + V2 = g->getOperand(0);
>>>> +
>>>> + if (const Argument *A = dyn_cast<Argument>(V2))
>>>> + if (A->hasNoAliasAttr())
>>>> + return NoAlias;
>>>> + } else if (isa<Constant>(V2) && isa<PointerType>(V1->getType())) {
>>>> + while (const GEPOperator *g = dyn_cast<GEPOperator>(V1))
>>>> + V1 = g->getOperand(0);
>>&...
2013 Jan 15
2
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
...;
+ bool rhs_global = isa<GlobalValue>(RHSPtr);
+
+ bool lhs_noaliasarg = false;
+ bool rhs_noaliasarg = false;
+ bool lhs_byvalarg = false;
+ bool rhs_byvalarg = false;
+ if (const Argument *A = dyn_cast<Argument>(LHSPtr)) {
+ lhs_noaliasarg = A->hasNoAliasAttr();
+ lhs_byvalarg = A->hasByValAttr();
}
+ if (const Argument *A = dyn_cast<Argument>(RHSPtr)) {
+ rhs_noaliasarg = A->hasNoAliasAttr();
+ rhs_byvalarg = A->hasByValAttr();
+ }
+
+ bool pred_equal = (Predicate == ICmpInst::ICMP_EQ);
+ i...
2013 Jan 16
0
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
...EQ)
- return ConstantInt::get(ITy, false);
- }
+ bool lhs_noaliasarg = false;
+ bool rhs_noaliasarg = false;
+ bool lhs_byvalarg = false;
+ bool rhs_byvalarg = false;
+ if (const Argument *A = dyn_cast<Argument>(LHSPtr)) {
+ lhs_noaliasarg = A->hasNoAliasAttr();
+ lhs_byvalarg = A->hasByValAttr();
+ }
+ if (const Argument *A = dyn_cast<Argument>(RHSPtr)) {
+ rhs_noaliasarg = A->hasNoAliasAttr();
+ rhs_byvalarg = A->hasByValAttr();
+ }
- // Assume that the constant null is on the right.
- if (llv...
2012 Dec 12
0
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
On Wed, Dec 12, 2012 at 1:26 PM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Wed, Dec 12, 2012 at 11:01:01AM -0800, Dan Gohman wrote:
>> > Is that
>> > assumption violated if I explicitly cast away const and pass the result
>> > to a function with NoAlias argument?
>>
>> Not immediately, no. It means that you can't access the
2015 Jan 21
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...y are all required to
get the LICM issue fixed :)
>
> Regarding this:
>
> @@ -768,7 +774,10 @@ static Optional<StratifiedAttr>
> valueToAttrIndex(Value *Val) {
> return AttrGlobalIndex;
>
> if (auto *Arg = dyn_cast<Argument>(Val))
> - if (!Arg->hasNoAliasAttr())
> + // Only pointer arguments should 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()->...
2012 Dec 12
3
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
On Wed, Dec 12, 2012 at 11:01:01AM -0800, Dan Gohman wrote:
> > Is that
> > assumption violated if I explicitly cast away const and pass the result
> > to a function with NoAlias argument?
>
> Not immediately, no. It means that you can't access the constant
> pointer's pointee directly within the noalias argument's scope. Access
> to that object must go
2015 Jan 23
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...gt; Okay, please do that and commit them.
>
>
>
>
> Regarding this:
>
> @@ -768,7 +774,10 @@ static Optional<StratifiedAttr>
> valueToAttrIndex(Value *Val) {
> return AttrGlobalIndex;
>
> if (auto *Arg = dyn_cast<Argument>(Val))
> - if (!Arg->hasNoAliasAttr())
> + // Only pointer arguments should 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()->isPoint...
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
...t;>> Regarding this:
>>>
>>> @@ -768,7 +774,10 @@ static Optional<StratifiedAttr>
>>> valueToAttrIndex(Value *Val) {
>>> return AttrGlobalIndex;
>>>
>>> if (auto *Arg = dyn_cast<Argument>(Val))
>>> - if (!Arg->hasNoAliasAttr())
>>> + // Only pointer arguments should 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() &&am...
2015 Jan 23
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...gt; Okay, please do that and commit them.
>
>
>
>
> Regarding this:
>
> @@ -768,7 +774,10 @@ static Optional<StratifiedAttr>
> valueToAttrIndex(Value *Val) {
> return AttrGlobalIndex;
>
> if (auto *Arg = dyn_cast<Argument>(Val))
> - if (!Arg->hasNoAliasAttr())
> + // Only pointer arguments should 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()->isPoint...
2015 Jan 24
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...t; >
> >
> >
> > Regarding this:
> >
> > @@ -768,7 +774,10 @@ static Optional<StratifiedAttr>
> > valueToAttrIndex(Value *Val) {
> > return AttrGlobalIndex;
> >
> > if (auto *Arg = dyn_cast<Argument>(Val))
> > - if (!Arg->hasNoAliasAttr())
> > + // Only pointer arguments should 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->getTy...
2015 Jan 26
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...t; Regarding this:
> > >
> > > @@ -768,7 +774,10 @@ static Optional<StratifiedAttr>
> > > valueToAttrIndex(Value *Val) {
> > > return AttrGlobalIndex;
> > >
> > > if (auto *Arg = dyn_cast<Argument>(Val))
> > > - if (!Arg->hasNoAliasAttr())
> > > + // Only pointer arguments should 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->hasNoA...
2015 Jan 15
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...t.push_back(Edge(&Inst, TrueVal, EdgeType::Assign, AttrNone));
auto *FalseVal = Inst.getFalseValue();
@@ -768,7 +772,10 @@ static Optional<StratifiedAttr> valueToAttrIndex(Value *Val) {
return AttrGlobalIndex;
if (auto *Arg = dyn_cast<Argument>(Val))
- if (!Arg->hasNoAliasAttr())
+ // Only pointer arguments should 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())...
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)