Displaying 20 results from an estimated 29 matches for "isidentifiedobject".
2009 Nov 10
4
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
...as analysis is unsure about whether %p and 12345 may alias. But since %p is derived from %stuff, which has the noalias attribute, and 12345 is a constant and therefore cannot be derived from %stuff, they cannot alias.
>
> This sounds right. And actually, it's not limited to noalias;
> isIdentifiedObject objects don't alias inttoptr-casted integer
> literals either. I have a few comments on the patch below.
>
>> I'm attaching a patch which implements this. Please comment on whether this is sane, and if my code is the right way of doing it.
>>
>>
>> / Hans
>...
2009 Nov 12
0
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
...see.
However, I was not able to produce a test where this happens wihout the
getUnderlyingObject() returning the same value.
It would be nice if someone could produce such a test case, or dismiss
the possibility of this happening.
Anyway, saying that a Constant does not alias with a non-const
isIdentifiedObject object seems safe.
/ Hans
Hans Wennborg wrote:
> 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 fol...
2015 Jul 01
3
[LLVMdev] MIScheduler + AA: Missed scheduling opportunity in MIsNeedChainEdge. Bug?
...to memory? Is either access volatile? etc.), and finally queries AliasAnalysis if available.
Before reaching alias analysis, however, function isUnsafeMemoryObject pessimizes the result. In particular, isUnsafeMemoryObject returns true unless all of the pointer's underlying objects satisfy IsIdentifiedObject. This forces MIsNeedChainEdge to conservatively report true, even though AliasAnalysis could give a more precise answer in some situations. Further, it is unclear why this test even exists: it does not attempt to compare the underlying object sets to test for an alias, and the volatility check sh...
2009 Nov 13
1
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
...ch was wrong given code like:
@gv = global i32 0
define void @test() {
store i16 1, i16* inttoptr(i64 add(i64 ptrtoint(i32* @gv to i64),
i64 1) to i16*) ; ; Not dead
store i32 2, i32* @gv
ret void
}
> Anyway, saying that a Constant does not alias with a non-const
> isIdentifiedObject object seems safe.
Yup!
Please remove the tailing ; on the lines where they aren't needed in
your tests. Besides that, your patch looks great! Thanks!
Nick
> / Hans
>
>
> Hans Wennborg wrote:
>> Dan Gohman wrote:
>>> On Nov 4, 2009, at 6:43 AM, Hans Wennborg wr...
2012 Dec 12
2
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
...use it to compute the address, and
> thus restrict should have no bearing on it. That would in turn make Clang's
> optimization incorrect and also seems likely to make 'noalias' essentially
> useless for modeling restrict. =/
Looking a bit deeper, the issue is ultimately that isIdentifiedObject is
true if NoAlias is specified for the argument. There is a comment at the
beginning of AliasAnalysis.h that NoAlias doesn't imply inequal
pointers.
One of the uses in BasicAliasAnalysis.cpp seems also questionable
("Constant pointers can't alias with non-const isIdentifiedObject obj...
2009 Nov 05
0
[LLVMdev] BasicAliasAnalysis: constant does not alias with noalias parameter
...is that the alias analysis is unsure about whether %p and 12345 may alias. But since %p is derived from %stuff, which has the noalias attribute, and 12345 is a constant and therefore cannot be derived from %stuff, they cannot alias.
This sounds right. And actually, it's not limited to noalias;
isIdentifiedObject objects don't alias inttoptr-casted integer
literals either. I have a few comments on the patch below.
>
> I'm attaching a patch which implements this. Please comment on whether this is sane, and if my code is the right way of doing it.
>
>
> / Hans
> Index: lib/Analys...
2015 Mar 13
2
[LLVMdev] Alias analysis issue with structs on PPC
...he
arguments, and walks down the immediate use chain, marking things as based
on arguments or not), and makes a lookup table of things it can prove are
also unmolested identified objects.
(which would be the result of inttoptr in your case).
You can then use this simple lookup table to answer the isIdentifiedObject
question better.
(You'd have to make isIdentifiedObject part of the AA interface, or take an
optional table, blah blah blah)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150313/63c5e267/attachment.html...
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
2012 Mar 01
0
[LLVMdev] problem with inlining pass
Hi Jochen,
> My llvm version is 3.0 release.
> I have a module generated by clang. When I optimize it, I first add an
> inlining pass (llvm::createFunctionInliningPass), then these passes:
> - own FunctionPass
> - llvm::createPromoteMemoryToRegisterPass
> - llvm::createInstructionCombiningPass
> - llvm::createDeadInstEliminationPass
> - llvm::createDeadStoreEliminationPass
2012 Feb 29
2
[LLVMdev] problem with inlining pass
Hi!
My llvm version is 3.0 release.
I have a module generated by clang. When I optimize it, I first add an
inlining pass (llvm::createFunctionInliningPass), then these passes:
- own FunctionPass
- llvm::createPromoteMemoryToRegisterPass
- llvm::createInstructionCombiningPass
- llvm::createDeadInstEliminationPass
- llvm::createDeadStoreEliminationPass
- new llvm::DominatorTree()
- new
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 GlobalAliases, and byval arguments.
Unfortunately, a check of Argument vs. IsIdentifiedObject is too broad, because an argument (which is not noalias) can alias a GlobalValue.
Regarding t...
2013 May 27
1
[LLVMdev] Mixing noalias and regular arguments
Kuperstein, Michael M wrote:
> Regarding the name, I'm not sure noaliasAtFunctionEntry makes sense, for two reasons:
> a) The pointer involved may not be defined at entry.
Right, I thought of that too.
> 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 GlobalAliases, and byval arguments.
Okay.
> Unfortunately, a check of Argument vs. IsIdentifiedObject is too broad, because an argument (which is not noalias) can alias a GlobalValue....
2012 Dec 12
0
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
...e address, and
>> thus restrict should have no bearing on it. That would in turn make Clang's
>> optimization incorrect and also seems likely to make 'noalias' essentially
>> useless for modeling restrict. =/
>
> Looking a bit deeper, the issue is ultimately that isIdentifiedObject is
> true if NoAlias is specified for the argument. There is a comment at the
> beginning of AliasAnalysis.h that NoAlias doesn't imply inequal
> pointers.
>
> One of the uses in BasicAliasAnalysis.cpp seems also questionable
> ("Constant pointers can't alias with non...
2014 Dec 19
2
[LLVMdev] ScheduleDAGInstrs.cpp
Hi,
I write again regarding buildSchedGraph(), as I am still not happy about things there.
I have found at least two examples which do not work out:
1)
SU(2) Store "Value A"
SU(1) Store "Value A"
SU(0) Load "Value A"
If MIsNeedChainEdge() returns false for SU(0) and SU(1), SU(0) is inserted into RejectedMemNodes and removed from its MemUses SU list, as this
2012 Mar 01
3
[LLVMdev] Aliasing bug or feature?
...ion(MMOa->getValue(), Overlapa,
MMOa->getTBAAInfo()),
AliasAnalysis::Location(MMOb->getValue(), Overlapb,
MMOb->getTBAAInfo()));
Quick debug of BasicAliasAnalysis::aliasCheck() points to this code:
if (isIdentifiedObject(O1) && isIdentifiedObject(O2))
return NoAlias;
And in llvm::isIdentifiedObject() this is true:
if (isa<GlobalValue>(V) && !isa<GlobalAlias>(V))
Any qlues/suggestions are welcome. Thanks.
Sergei Larin
--
Qualcomm Innovation Center, Inc. is a member of Code Auror...
2013 Jan 15
2
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
...::isTrueWhenEqual(Pred));
-
- // Be more aggressive about stripping pointer adjustments when checking a
- // comparison of an alloca address to another object. We can rip off all
- // inbounds GEP operations, even if they are variable.
- LHSPtr = LHSPtr->stripInBoundsOffsets();
- if (llvm::isIdentifiedObject(LHSPtr)) {
- RHSPtr = RHSPtr->stripInBoundsOffsets();
- if (llvm::isKnownNonNull(LHSPtr) || llvm::isKnownNonNull(RHSPtr)) {
- // If both sides are different identified objects, they aren't equal
- // unless they're null.
- if (LHSPtr != RHSPtr && llvm::isIden...
2015 Mar 15
5
[LLVMdev] Alias analysis issue with structs on PPC
...marking things as based
>> on arguments or not), and makes a lookup table of things it can prove are
>> also unmolested identified objects.
>> (which would be the result of inttoptr in your case).
>>
>> You can then use this simple lookup table to answer the
>> isIdentifiedObject question better.
>> (You'd have to make isIdentifiedObject part of the AA interface, or take
>> an optional table, blah blah blah)
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu...
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
2013 Jan 16
0
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
...t Function *rhs_func = 0;
- // Be more aggressive about stripping pointer adjustments when checking a
- // comparison of an alloca address to another object. We can rip off all
- // inbounds GEP operations, even if they are variable.
- LHSPtr = LHSPtr->stripInBoundsOffsets();
- if (llvm::isIdentifiedObject(LHSPtr)) {
- RHSPtr = RHSPtr->stripInBoundsOffsets();
- if (llvm::isKnownNonNull(LHSPtr) || llvm::isKnownNonNull(RHSPtr)) {
- // If both sides are different identified objects, they aren't equal
- // unless they're null.
- if (LHSPtr != RHSPtr && llvm::isIden...
2019 Jun 05
2
Question about a AA result and its use in Dependence Analysis
...Value *BObj = GetUnderlyingObject(LocB.Ptr, DL);
// If the underlying objects are the same, they must alias
if (AObj == BObj)
return MustAlias;
// We may have hit the recursion limit for underlying objects, or have
// underlying objects where we don't know they will alias.
if (!isIdentifiedObject(AObj) || !isIdentifiedObject(BObj))
return MayAlias;
// Otherwise we know the objects are different and both identified objects so
// must not alias.
return NoAlias;
and I recall suggesting this use of AA to pick up the metadata-based AA results. We shouldn't need both the AA che...