[llvm-commits] [llvm] r92829 - in /llvm/trunk: include/llvm/Analysis/AliasAnalysis.h lib/Analysis/AliasAnalysis.cpp lib/Target/README.txt lib/Transforms/IPO/FunctionAttrs.cpp test/Transforms/FunctionAttrs/2008-10-04-LocalMemory.ll utils/TableGen/IntrinsicEmitter.cpp

Chris Lattner clattner at apple.com
Sat Jan 9 13:51:13 PST 2010


On Jan 9, 2010, at 8:31 AM, Duncan Sands wrote:

> Hi Chris,
> 
>> A better way is to call AA->getModRefBehavior() on the call site itself instead of calling AliasAnalysis::getModRefBehavior(id).  This form of the method takes an optional vector (should be a smallvectorimpl, but alas) of PointerAccessInfo.  When getModRefBehavior returns 'accesses arguments', it is supposed to fill in this vector.  You then loop over each of the results to find out how it accesses the arguments allowing the more precise analysis.
>> The nice thing about this approach is that it means we just teach basicaa to implement getModRefBehavior more aggressively for whatever builtin functions we want, and all transformations that want to know this stuff can reuse the logic.
> 
> sounds yummy :)  However at the moment it seems that alias analysis returns
> AccessesArguments only when calling an intrinsic, and doesn't put anything
> in the PointerAccessInfo, so using an alias analysis call would be equivalent
> to what functionattrs is doing now (only a bit more expensive I suppose).

Right, but then we can improve basicaa to handle these...

-Chris



More information about the llvm-commits mailing list