search for: getmodrefbehavior

Displaying 19 results from an estimated 19 matches for "getmodrefbehavior".

2009 Nov 06
0
[LLVMdev] Functions: sret and readnone
...t;sample$int$float3"] = true; } void getAnalysisUsage(llvm::AnalysisUsage &usage) const { AliasAnalysis::getAnalysisUsage(usage); usage.setPreservesAll(); } bool runOnFunction(Function &F) { AliasAnalysis::InitializeAliasAnalysis(this); return false; } ModRefBehavior getModRefBehavior(CallSite CS, std::vector<PointerAccessInfo> *Info = 0) { if(_srets.find(CS.getCalledFunction()->getName()) != _srets.end()) return AliasAnalysis::AccessesArguments; // only accesses args, no globals return AliasAnalysis::getModRefBehavior(CS, Info); } ModRefBehavior getModRefBeh...
2009 Nov 06
2
[LLVMdev] Functions: sret and readnone
Hi Stephan, > intrinsic float4 sample(int tex, float2 tc); > > float4 main(int tex, float2 tc) > { > float4 x = sample(tex, tc); > return 0.0; > } without additional information it would be wrong to remove the call to sample because it might write to a global variable. > As you can see, the call to the sample function is still present, > although the actual value
2013 Apr 16
2
[LLVMdev] Custom AA implementation is not used
Hello LLVM devs, I'm trying to write my own alias analysis that only contributes information to the getModRefBehavior query, and should be in its own library loadable by opt. However, even though my pass is run (and executed immediately before the client pass that is calling AA.doesNotAccessMemory(F)), the queries never reach my implementation. What am I missing? Thanks in advance, Julian -------------- next...
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 SetAliasResultField); Add wrapper APIs to pre...
2013 May 03
0
[LLVMdev] Custom AA implementation is not used
Julian Oppermann wrote: > Hello LLVM devs, > > I'm trying to write my own alias analysis that only contributes > information to the getModRefBehavior query, and should be in its own > library loadable by opt. > > However, even though my pass is run (and executed immediately before the > client pass that is calling AA.doesNotAccessMemory(F)), the queries > never reach my implementation. What am I missing? You don't provide an...
2017 Oct 10
2
Expose aliasing information in getModRefInfo (or viceversa?)
...p 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 getM...
2017 Oct 09
2
Expose aliasing information in getModRefInfo (or viceversa?)
...t;> 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...
2017 Oct 09
1
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, &g...
2017 Oct 10
2
Expose aliasing information in getModRefInfo (or viceversa?)
...we could do the same. If we determine it's a must-alias of a set of things, we could do the same If we determine it's a must-alias of the live on entry def, etc If I understand correctly, the necessary info 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 ==...
2009 Apr 18
0
[LLVMdev] GlobalsModRef
Hi, In my pass, I want to use the alias-analysis info provided by "GlobalsModRef". How should I use "getModRefBehavior(...)"-method and "alias(...)", in order to get the best presicion? More precisely, how can I find the required arguments, particularly "PointerAccessInfo", for this methods. And is it a good idea to use "GlobalsModRef" in the "doInitialization" of a fu...
2009 Nov 06
1
[LLVMdev] Functions: sret and readnone
Hi Stephan, >> In order to perform this transform the optimizers would have to work out >> that sample does not modify any global state. This cannot be done without >> knowing the definition of sample, but you only provide a declaration. > > Which is why I am trying to supply this additional information in a > custom alias analysis pass, but it doesn't seem to
2007 Feb 22
0
[LLVMdev] Unused malloc/free don't get optimized
On Feb 22, 2007, at 1:54 PM, Nick Lewycky wrote: > Vikram S. Adve wrote: >> On Feb 22, 2007, at 10:21 AM, Robert L. Bocchino Jr. wrote: >> >> >>> I glanced at the code again, and it looks like I use DSA to (1) >>> construct the call graph and (2) identify things that would be >>> unsafe to put on the stack, such as arrays, cyclic data structures,
2008 Mar 01
0
[LLVMdev] Google Summer of Code Idea
...ojects that would be useful for llvm >> though. > > In order that I may be to gauge what options there are, can you > suggest some examples of these subprojects. There are lots of mini projects, revolving around use of better alias analysis: 1. The alias analysis API supports the getModRefBehavior method, which allows the implementation to give details analysis of the functions. For example, we could implement full knowledge of printf/scanf side effects, which would be useful (PR1604). 2. We need some way to reason about errno. Consider a loop like this: for () x += sqr...
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 > >
2007 Feb 22
2
[LLVMdev] Unused malloc/free don't get optimized
Vikram S. Adve wrote: > On Feb 22, 2007, at 10:21 AM, Robert L. Bocchino Jr. wrote: > > >>I glanced at the code again, and it looks like I use DSA to (1) >>construct the call graph and (2) identify things that would be >>unsafe to put on the stack, such as arrays, cyclic data structures, >>and allocations with escaping references. Right now these parts
2008 Mar 01
2
[LLVMdev] Google Summer of Code Idea
> Ok. I think the most important thing to keep in mind, if you want > this to be useful for LLVM, is for it to be sound in the presence of > incomplete programs. I think it would be very interesting to have a > BDD based analysis in LLVM, it would be useful for performance > comparisons and many other things, even if it isn't turned on by > default. However, it must
2009 Nov 05
0
[LLVMdev] Functions: sret and readnone
...he time to look into this. What I did was to build a custom AliasAnalysis pass, as Chris suggested, that returns AliasAnalysis::Mod for values passed to the sample function in the sret spot, and NoModRef for all other values. I'm also returning AliasAnalysis::AccessesArguments in the pass' getModRefBehavior methods. However, I haven't been successful with this approach and hope that someone has an idea on how to fix this. Here's a step by step illustration of the problem: 1. The following source code is compiled ... intrinsic float4 sample(int tex, float2 tc); float4 main(int tex, float2 t...
2009 Oct 06
2
[LLVMdev] Functions: sret and readnone
On 5 Okt., 23:33, Dan Gohman <goh... at apple.com> wrote: > > Is there a reason it needs to be an array? A vector of four floats > wouldn't have this problem, if that's an option. > Unfortunately that's not an option. At the moment I'm restricting myself to the use of scalar code only, in order to be able to vectorize the code easily later (e.g., float4 as it is
2017 Feb 06
3
Kaleidoscope tutorial: comments, corrections and Windows support
Hi, I'm currently working my way through the tutorial with LLVM 3.9.1 on Windows (finished chapter 4) and stumbled over a few things which could be improved: - "LLVMContext" does not exist as a variable -> "TheContext" - Chapter 3: 5 times - Chapter 4: 1 time - Chapter 5: 4 times - Chapter 6: 2 times - Chapter 7: 2 times 3.4. Function Code