[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
Duncan Sands
baldrick at free.fr
Sat Jan 9 08:31:09 PST 2010
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).
Ciao,
Duncan.
More information about the llvm-commits
mailing list