[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
    Duncan Sands 
    baldrick at free.fr
       
    Mon Nov  8 09:43:02 PST 2010
    
    
  
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.
Ciao,
Duncan.
    
    
More information about the llvm-commits
mailing list