Displaying 20 results from an estimated 47 matches for "nomodref".
Did you mean:
modref
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
2009 Oct 09
1
[LLVMdev] DS-AA reports erroneous NoModRef
...f at the call site.
I am not sure whether there is an error in either ds-aa or in
BottomUpDSA.
I have reduced the program down to a simpler test case. Here the
intermediate functions have an "IE" node. The error occurs when trying
to see if @spec_compress() does Mod/Ref @spec_fd1 (NoModRef reported).
In contrast, ds-aa correctly reports ModRef on the callsite to
@spec_putc() in @compressStream().
Kind regards,
Hans.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testcase-dce.ll
Type: application/octet-stream
Size: 6431 bytes
Desc: not availa...
2010 Feb 14
4
[LLVMdev] A very basic doubt about LLVM Alias Analysis
...elementptr inbounds ([9 x i8]* @.str, i32
0, i32 0)
NoAlias: i32* %2, i8* getelementptr inbounds ([9 x i8]* @.str, i32
0, i32 0)
NoAlias: i32* %4, i8* getelementptr inbounds ([9 x i8]* @.str, i32
0, i32 0)
NoAlias: i32* %k, i8* getelementptr inbounds ([9 x i8]* @.str, i32
0, i32 0)
NoModRef: Ptr: i32* %retval <-> %6 = call i32 (i8*, ...)*
@printf(i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), i32
%5, i32 %3, i32 %1) nounwind ; <i32> [#uses=0] NoModRef: Ptr: i32**
%j <-> %6 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds
([9 x i8]...
2010 Feb 14
4
[LLVMdev] A very basic doubt about LLVM Alias Analysis
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.
Duncan Sands wrote:
> Hi ambika,
>
>> main() {
>> int i,*k;
>> k =
2011 Jul 21
1
[LLVMdev] AA bug?
...'*' below:
AliasAnalysis::ModRefResult
AliasAnalysis::getModRefInfo(const VAArgInst *V, const Location &Loc) {
// If the va_arg address cannot alias the pointer in question, then the
// specified memory cannot be accessed by the va_arg.
if (!alias(getLocation(V), Loc))
return NoModRef;
// If the pointer is a pointer to constant memory, then it could not have been
// modified by this va_arg.
if (pointsToConstantMemory(Loc))
return NoModRef; *************
// Otherwise, a va_arg reads and writes.
return ModRef;
}
************* It looks like that lin...
2017 Oct 10
2
Expose aliasing information in getModRefInfo (or viceversa?)
...t;
I didn't mean to pick on the example, sorry if that's how it came through.
Since the consensus is to expose the Must info in ModRefInfo, I'm trying to
figure out how to add it in a way that makes sense to me.
The way I see ModRefInfo is designed right now is to lower the lattice to
NoModRef as fast as possible (start with ModRef as top, get to NoModRef as
bottom). The implementation is based on having either Mod or Ref and
masking out everything else.
Introducing a Must bit, means setting it occasionally (since May is
conservative) and then preserving it, so the opposite: start lattic...
2009 May 14
2
[LLVMdev] alias analysis results
...sites
NoAlias: i32* %aa, i32** %kk
NoAlias: i32* %aa, i32** %jj
NoAlias: i32** %jj, i32** %kk
MayAlias: i32* %0, i32* %aa
MayAlias: i32* %0, i32** %kk
MayAlias: i32* %0, i32** %jj
Function: main: 2 pointers, 1 call sites
NoAlias: i32* %0, i32* %retval
NoModRef: Ptr: i32* %retval <-> call void @test() nounwind
NoModRef: Ptr: i32* %0 <-> call void @test() nounwind
This way at least I could see " aa <- (kk, jj)" results from mayalias.
2. opt -anders-aa -aa-eval -print-all-alias-modref-info test4.bc
Function: tes...
2017 Oct 10
4
Expose aliasing information in getModRefInfo (or viceversa?)
...pick on the example, sorry if that's how it came through.
>
> Since the consensus is to expose the Must info in ModRefInfo, I'm trying
> to figure out how to add it in a way that makes sense to me.
> The way I see ModRefInfo is designed right now is to lower the lattice to
> NoModRef as fast as possible (start with ModRef as top, get to NoModRef as
> bottom). The implementation is based on having either Mod or Ref and
> masking out everything else.
> Introducing a Must bit, means setting it occasionally (since May is
> conservative) and then preserving it, so the op...
2017 Nov 28
1
Expose aliasing information in getModRefInfo (or viceversa?)
...the users of getModReg(). In your new proposal,
>> doing & on the result of getModRef() may yield unexpected results.
>>
>> E.g., “getModRef() & MRI_MustMod != 0” doesn’t imply that the
>> instruction will write because the result might have been MRI_Mod (=
>> NoModRef | MustMod).
>>
>> As long as this fact is properly document, I’m good :) (btw, thanks for
>> fixing the documentation of the old MRI_* values; it was really misleading).
>>
>>
>>
>> Nuno
>>
>>
>>
>> P.S.: BTW, not sure I mentioned t...
2010 Jul 16
2
[LLVMdev] MemoryDependenceAnalysis Bug or Feature?
...ould be returning a "def"
instead. My thinking is the code should look like this (from line 288 on,
+++ marks addition):
// See if this instruction (e.g. a call or vaarg) mod/ref's the
pointer.
switch (AA->getModRefInfo(Inst, MemPtr, MemSize)) {
case AliasAnalysis::NoModRef:
// If the call has no effect on the queried pointer, just ignore it.
continue;
case AliasAnalysis::Mod:
// If we're in an invariant region, we can ignore calls that ONLY
// modify the pointer.
if (InvariantTag) continue;
return MemDepResult::getCl...
2010 Jul 17
0
[LLVMdev] MemoryDependenceAnalysis Bug or Feature?
...;
> instead. My thinking is the code should look like this (from line 288 on,
> +++ marks addition):
>
> // See if this instruction (e.g. a call or vaarg) mod/ref's the
> pointer.
> switch (AA->getModRefInfo(Inst, MemPtr, MemSize)) {
> case AliasAnalysis::NoModRef:
> // If the call has no effect on the queried pointer, just ignore it.
> continue;
> case AliasAnalysis::Mod:
> // If we're in an invariant region, we can ignore calls that ONLY
> // modify the pointer.
> if (InvariantTag) continue;
>...
2015 Aug 07
2
load instruction erroneously removed by GVN
...vaarg) mod/ref's the
pointer.
AliasAnalysis::ModRefResult MR = AA->getModRefInfo(Inst, MemLoc);
// If necessary, perform additional analysis.
if (MR == AliasAnalysis::ModRef)
MR = AA->callCapturesBefore(Inst, MemLoc, DT);
switch (MR) {
case AliasAnalysis::NoModRef:
// If the call has no effect on the queried pointer, just ignore it.
continue;
case AliasAnalysis::Mod:
return MemDepResult::getClobber(Inst);
case AliasAnalysis::Ref:
// If the call is known to never store to the pointer, and if
this is a
// load quer...
2010 Jul 18
2
[LLVMdev] MemoryDependenceAnalysis Bug or Feature?
...code should look like this (from line 288
> on,
> > +++ marks addition):
> >
> > // See if this instruction (e.g. a call or vaarg) mod/ref's the
> > pointer.
> > switch (AA->getModRefInfo(Inst, MemPtr, MemSize)) {
> > case AliasAnalysis::NoModRef:
> > // If the call has no effect on the queried pointer, just ignore
> it.
> > continue;
> > case AliasAnalysis::Mod:
> > // If we're in an invariant region, we can ignore calls that ONLY
> > // modify the pointer.
> >...
2010 Jul 18
0
[LLVMdev] MemoryDependenceAnalysis Bug or Feature?
...line 288
>> > on,
>> > +++ marks addition):
>> >
>> > // See if this instruction (e.g. a call or vaarg) mod/ref's the
>> > pointer.
>> > switch (AA->getModRefInfo(Inst, MemPtr, MemSize)) {
>> > case AliasAnalysis::NoModRef:
>> > // If the call has no effect on the queried pointer, just ignore
>> > it.
>> > continue;
>> > case AliasAnalysis::Mod:
>> > // If we're in an invariant region, we can ignore calls that ONLY
>> > // modi...
2016 Aug 29
2
GVN / Alias Analysis issue with llvm.masked.scatter/gather intrinsics
...removed. After some debugging, I
realized that this is happening because the Memory Dependence Analysis
returns %tmp.v.0 as the Def dependency for %tmp.v.1, even though the
scatter call in between changes the value stored at %tmp. This, in turn, is
happening because the alias analysis is returning NoModRef for the %tmp.v.1
and second scatter callsites. The resulting IR produces the wrong result:
define spir_kernel void @test(<2 x i32*> %in1, <2 x i32*> %in2, i32* %out) {
> entry:
> %tmp.0 = alloca i32
> %tmp.1 = alloca i32
> %tmp.i = insertelement <2 x i32*> undef...
2017 Oct 10
2
Expose aliasing information in getModRefInfo (or viceversa?)
I'm trying to understand what is the result we'd seek in the example
in D38569 (pasting here for quick access)
double f(double a)
{
double b;
double c,d;
double (*fp) (double) __attribute__ ((const));
/* Partially redundant call */
if (a < 2.0)
{
fp = sin;
c = fp (a);
}
else
{
c = 1.0;
fp = cos;
}
d = fp (a);
2015 Sep 08
2
[RFC] Generalize llvm.memcpy / llvm.memmove intrinsics.
Hi Hal,
> If you attach noalias metadata to the memcpy call, it will apply to both
the source and destination; we don't have a way to differentiate. It might
be true that if you attach both noalias and alias.scope metadata to the
call, then querying the call against itself will return NoModRef, but
that's really hacky (and, in part, wrong, because the destination still
alias with itself).
Sorry it took me a while to get back to this, and thanks for the
explanation. I had misremembered how noalias metadata worked, and was
imagining we could tag the pointers themselves as non-aliasing...
2015 Mar 31
4
[LLVMdev] where should volatileness really live in the AA API?
So, i'm working through the last of miniscule gvn optimizations, and
one of the things that gets tested is whether it will eliminate
non-volatile loads in favor of ohter non-volatile loads when there are
volatile loads in the way.
I.E.
define i32 @test1(i32* nocapture %p, i32* nocapture %q) {
entry:
%x = load i32, i32* %p
%0 = load volatile i32, i32* %q
%y = load i32, i32* %p
%add =
2010 Dec 15
0
[LLVMdev] Interprocedural alias analysis
...int global;
int bar(void) {
return 5;
}
int foo(void) {
int a;
scanf("%d", &a);
if(global)
a = bar();
return a;
}
In this case, I expected getModRefInfo() on the load instruction for
'global' and
the call instruction for 'bar()' in foo() yields "NoModRef", but it actually
give "ModRef".
Am I understanding 'interprocedural' in wrong way? or making any mistake?
Or does '-steens-aa' have any problem?
I'm also curious if there is any ongoing project or plan to implement or
improve
interprocedural alias analysis.
Th...
2009 Nov 06
0
[LLVMdev] Functions: sret and readnone
...ize)
{
std::string functionName = CS.getCalledFunction()->getNameStr();
if(_srets.find(functionName) != _srets.end())
{
if(CS.hasArgument(P))
{
if(CS.getArgument(0) == P)
return AliasAnalysis::Mod; // modify value pointed to by sret
param
else
return AliasAnalysis::NoModRef; // there aren't any other pointer
args
}
}
return AliasAnalysis::getModRefInfo(CS, P, Size);
}
bool hasNoModRefInfoForCalls() const { return false; }
};
> If you provided a body too then the GlobalsModRef analysis might be able to
> work it out.
That's not an option beca...