search for: getmodrefinfo

Displaying 20 results from an estimated 111 matches for "getmodrefinfo".

2017 Oct 10
2
Expose aliasing information in getModRefInfo (or viceversa?)
...his is odd. On my clang.bc Without: 2.2967 ( 53.8%) 0.0242 ( 26.4%) 2.3210 ( 53.2%) 2.3227 ( 53.2%) Memory SSA 2.3364 ( 53.7%) 0.0246 ( 25.7%) 2.3610 ( 53.1%) 2.3636 ( 53.1%) Memory SSA 2.3353 ( 54.0%) 0.0258 ( 27.0%) 2.3611 ( 53.4%) 2.3632 ( 53.3%) Memory SSA With two getModRefInfo calls: 3.0302 ( 58.8%) 0.0328 ( 29.9%) 3.0630 ( 58.2%) 3.0858 ( 58.2%) Memory SSA 3.0097 ( 58.9%) 0.0325 ( 30.0%) 3.0422 ( 58.3%) 3.0590 ( 58.3%) Memory SSA 3.0486 ( 58.8%) 0.0317 ( 29.4%) 3.0804 ( 58.2%) 3.1331 ( 58.3%) Memory SSA with alias followed by getModRefInfo...
2017 Oct 09
3
Expose aliasing information in getModRefInfo (or viceversa?)
Hi, This came up in https://reviews.llvm.org/D38569, and I'd like some input on what's the best way to get alias and mod-ref info without having two alias calls. A couple of ideas: (a) Extend the getModRefInfo interface (+getModRefBehavior, +gerArgModRefInfo) to return a pair {ModRefInfo, AliasResult}. The AliasResult can be optional based on an argument e.g.: struct MRI_AR { ModRefInfo MRI, AliasResult AR }; MRI_AR getModRefInfoAlias (LoadInst *LI, MemoryLocation Loc, bool SetAliasResultFi...
2017 Oct 09
2
Expose aliasing information in getModRefInfo (or viceversa?)
...om> > wrote: > >> Hi, >> >> This came up in https://reviews.llvm.org/D38569, and I'd like some input >> on what's the best way to get alias and mod-ref info without having two >> alias calls. >> >> A couple of ideas: >> (a) Extend the getModRefInfo interface (+getModRefBehavior, >> +gerArgModRefInfo) to return a pair {ModRefInfo, AliasResult}. >> >> The AliasResult can be optional based on an argument >> e.g.: >> struct MRI_AR { ModRefInfo MRI, AliasResult AR }; >> MRI_AR getModRefInfoAlias (Lo...
2017 Oct 09
1
Expose aliasing information in getModRefInfo (or viceversa?)
...t gmail.com>> wrote: > > Hi, > > This came up in https://reviews.llvm.org/D38569, and I'd like some > input on what's the best way to get alias and mod-ref info without > having two alias calls. > > A couple of ideas: > (a) Extend the getModRefInfo interface (+getModRefBehavior, > +gerArgModRefInfo) to return a pair {ModRefInfo, AliasResult}. > > The AliasResult can be optional based on an argument > e.g.: > struct MRI_AR { ModRefInfo MRI, AliasResult AR }; > MRI_AR getModRefInfoAlias (LoadIn...
2016 May 10
2
How to extend alias analysis to enable further optimisations?
...not target the same location as accesses performed after the call (hence, the variables accessed before and after the call do not alias). We want to integrate this analysis within the existing analyses, such that standard compiler optimisations can use this info. Do you suggest that we change the getModRefInfo() or there is a better way to expose the no-aliasing information to the optimisations? If getModRefInfo() is the way to go, can you please indicate how to start? Where can I find documentation about the way getModRefInfo() works and how it is used by the optimisation passes. Any suggestion on parti...
2017 Oct 10
2
Expose aliasing information in getModRefInfo (or viceversa?)
...for fp in this example is: isMustAlias (CallSite argument a, Value a) && getModRefBehavior(CallSite)== onlyReadsMemory. So adding a MRI_MustMod is insufficient? Are we instead looking to set a MRI_Must bit, disjunct of MRI_Mod, and test for MRI_Ref&MRI_Must or MRI_Mod&MRI_Must? In getModRefInfo(CS, Loc), the MRI_Must bit would then be set if doesAccessArgPointees and ArgAlias == MustAlias for all Args, which seems correct. I may be missing something here, I don't want to dive into the wrong implementation. On Tue, Oct 10, 2017 at 9:16 AM, Alina Sbirlea <alina.sbirlea at gmail.c...
2005 Apr 25
0
[LLVMdev] "Best" alias analysis algorithm
...//zigzag.lvk.cs.msu.su/~ghost/localize/a.cpp The LLVM bytecode is at http://zigzag.lvk.cs.msu.su/~ghost/localize/a.ll And the output from my code is http://zigzag.lvk.cs.msu.su/~ghost/localize/output.txt The code itself is in http://zigzag.lvk.cs.msu.su/~ghost/localize/code/ The GlobalsModRef::getModRefInfo has this logic: // If we are asking for mod/ref info of a direct call with a pointer to a // global we are tracking, return information if we have it. if (GlobalValue *GV = const_cast<GlobalValue*>(getUnderlyingObject(P))) if (GV->hasInternalLinkage()) So, no informati...
2017 Oct 10
2
Expose aliasing information in getModRefInfo (or viceversa?)
..._ModRef. While the implementation details *may* be ok to resolve, there are calls checking for equality to MRI_Ref or MRI_Mod (not &), so adding the occasional Must bit seems bad. So I guess my question is, what's the right approach here? I feel like I'm not on the right path. > In getModRefInfo(CS, Loc), the MRI_Must bit would then be set if >> doesAccessArgPointees and ArgAlias == MustAlias for all Args, which seems >> correct. >> > > > alias == MustAlias for Loc, not for all args. > (IE It it returns a singular result about Loc, not a result about all args)...
2005 Apr 25
5
[LLVMdev] "Best" alias analysis algorithm
...] br bool %tmp.1, label %UnifiedReturnBlock, label %else else: ; preds = %entry %tmp.3 = call int %_Z3bari( int %p ) ; <int> [#uses=1] ret int %tmp.3 UnifiedReturnBlock: ; preds = %entry ret int %p } For each instruction, I call AliasAnalysis::getModRefInfo with the 'i' global variable. I tried different alias analyses -- the default one, --aa-eval, --anders-aa, -steens-aa and -globalsmodref-aa. The 'i' variable is never modified in the program, however, all analyses except for -globalsmodref-aa report that the %tmp.3 = call...
2012 Feb 15
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Just want to test out the LLVM's AliasAnalysis::getModRefInfo API. The input C code is very simple: void foo(int *a, int *b) { for(int i=0; i<10; i++) b[i] = a[i]*a[i]; } int main() { int a[10]; int b[10]; for(int i=0; i<10; i++) a[i] = i; foo(a,b); return 0; } Obviously, for "foo", it only reads from array "a&qu...
2008 Apr 03
3
[LLVMdev] problem with using DSA for a side-effect analysis
Thanks guys! I was looking into ModRef before, but I don't think that's exactly what I need. ModRef API call getModRefInfo requires a Value to be passed to it. However, some memory location M (which is a <DSNode, offset> pair) visible to the caller can be modified in the callee without any Value in the caller actually pointing to that location. I also need to capture those... I would need a call similar to getMo...
2015 Dec 12
2
Objects of MemoryLocation class are created for ‘llvm.memset.*‘ intrinsics
...unknown instruction. See AliasSet::aliasesUnknownInst in lib/Analysis/AliasSetTracker.cpp. > > We do know how to create MemoryLocation objects for memsets, see MemoryLocation::getForDest, but we don't do so in the AliasSetTracker. We're taking advantage here of the fast that AA's getModRefInfo understands (or should understand) enough about memset to accurately answer the queries. Hi Hal, Thank you for the explanation! -- Cheers, Roman Gareev.
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Thanks Duncan! You are right! If I type the command "opt -basicaa -mypass ...", then the output makes sense. Now, how can you specify which AA to use in the code? Regards, Welson On Thu, Feb 16, 2012 at 12:05 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Welson, the default alias analysis is -no-aa. As the name suggests it > just returns MayAlias for everything.
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
...%14 = getelementptr inbounds [10 x i32]* *%b*, i32 0, i32 0 Must alias. Can someone help identifying where is wrong with my code? Thanks! Welson On Tue, Feb 14, 2012 at 5:12 PM, Welson Sun <welson.sun at gmail.com> wrote: > Just want to test out the LLVM's AliasAnalysis::getModRefInfo API. The > input C code is very simple: > > void foo(int *a, int *b) > { > for(int i=0; i<10; i++) > b[i] = a[i]*a[i]; > } > > int main() > { > int a[10]; > int b[10]; > > for(int i=0; i<10; i++) > a[i] = i; > > foo(a,b); &g...
2012 Feb 16
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Hi Welson, the default alias analysis is -no-aa. As the name suggests it just returns MayAlias for everything. Maybe you are using that one? Best wishes, Duncan.
2015 Mar 31
4
[LLVMdev] where should volatileness really live in the AA API?
...tile 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 = sub i32 %y, %x ret i32 %add } Currently, getModRefInfo will return Mod for getModRefInfo(%0, AA->getLocation(%y)) This is because it punts on saying anything about ordered loads I can certainly watch for this case in the caller, and ignore it if it's volatile load vs non-volatile load. This is what MemDep does. class Location is theoretically...
2007 Feb 22
2
[LLVMdev] Unused malloc/free don't get optimized
...ations escape a function. In DSA, you can do > this because there is an explicit points-to graph: you can find all > objects escaping "upwards" from a function by traversing the graph, > starting at globals, formal arguments, and return values. I think you could use "getModRefInfo(CallSite, Value *, unsigned)". "getModRefInfo (for call sites) - Return whether information about whether a particular call site modifies or reads the memory specified by the pointer." If I read that right, it can only return no modify when the called function and its callees never...
2005 Apr 20
1
[LLVMdev] Tracking global variables accesses
...will modify a > particular global (to get a list of all globals potentially modified, just > iterate through the globals). If your pass uses the standard alias > analysis interface, this will allow it to work with many different aa > implementations. So, I can just call AliasAnalysis::getModRefInfo with a call instruction and global value as argument? Excellent. > The other option is to hack the globals mod/ref alias analysis in > Analysis/IPA to do what you want. Will that have any advantage over calling getModRefInfo for each global variable? - Volodya
2008 Apr 04
0
[LLVMdev] problem with using DSA for a side-effect analysis
On Thu, Apr 3, 2008 at 4:53 PM, Zvonimir Rakamaric <zrakamar at gmail.com> wrote: > Thanks guys! > > I was looking into ModRef before, but I don't think that's exactly > what I need. ModRef API call getModRefInfo requires a Value to be > passed to it. However, some memory location M (which is a <DSNode, > offset> pair) visible to the caller can be modified in the callee > without any Value in the caller actually pointing to that location. I > also need to capture those... > > I...
2017 Oct 10
4
Expose aliasing information in getModRefInfo (or viceversa?)
...as a major problem. Please feel free to fix these places > by replacing the equality checks with mask checks. > Ok, thank you! > > > -Hal > > So I guess my question is, what's the right approach here? I feel like I'm > not on the right path. > > >> In getModRefInfo(CS, Loc), the MRI_Must bit would then be set if >>> doesAccessArgPointees and ArgAlias == MustAlias for all Args, which seems >>> correct. >>> >> >> >> alias == MustAlias for Loc, not for all args. >> (IE It it returns a singular result about Loc,...