[llvm-commits] [llvm] r118412 - in /llvm/trunk: include/llvm/Analysis/AliasAnalysis.h lib/Analysis/AliasAnalysis.cpp lib/Analysis/AliasAnalysisCounter.cpp lib/Analysis/AliasDebugger.cpp lib/Analysis/BasicAliasAnalysis.cpp lib/Analysis/NoAliasAnalysis.cpp lib/Analysis/TypeBasedAliasAnalysis.cpp lib/Transforms/IPO/FunctionAttrs.cpp test/Transforms/FunctionAttrs/2008-12-29-Constant.ll

Dan Gohman gohman at apple.com
Mon Nov 8 12:29:49 PST 2010


On Nov 8, 2010, at 9:43 AM, Duncan Sands wrote:

> Hi Dan,
> 
>> +/// pointsToConstantMemory - Returns whether the given pointer value
>> +/// points to memory that is local to the function, with global constants being
>> +/// considered local to all functions.
>> +bool
>> +BasicAliasAnalysis::pointsToConstantMemory(const Location&Loc, bool OrLocal) {
>> +  assert(Visited.empty()&&  "Visited must be cleared after use!");
>> +
>> +  SmallVector<const Value *, 16>  Worklist;
>> +  Worklist.push_back(Loc.Ptr);
> 
> you should really put a limit on how deep you want to allow the "recursion" to
> go.  IIRC, the reason that PointsToLocalOrConstantMemory had a limit is that it
> was seen to take a long time on some crazy testcase.

Ok.

Dan





More information about the llvm-commits mailing list