[LLVMdev] "Best" alias analysis algorithm
Chris Lattner
sabre at nondot.org
Mon Apr 25 08:48:20 PDT 2005
On Mon, 25 Apr 2005, Vladimir Prus wrote:
> On Monday 25 April 2005 14:43, Vladimir Prus wrote:
> 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 information is produced for external variables, the function calls
> Aliasanalysis::getModRefInfo, which sees that called function may write to
> memory, and returns true for all global variables.
>
> Anything I can do about it? What I what is minimally accurate information
> about all global variables a function may modify. "Modifies them all" is
> clearly not even minimally accurate.
I will take a look at this and fix globals-modref. This is definitely
over conservative! Thanks for pointing it out!
-Chris
--
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/
More information about the llvm-dev
mailing list