[llvm-commits] [llvm] r113858 - in /llvm/trunk: include/llvm/Analysis/AliasAnalysis.h include/llvm/Analysis/LibCallAliasAnalysis.h include/llvm/Analysis/LibCallSemantics.h include/llvm/LLVMContext.h lib/Analysis/AliasAnalysis.cpp lib/Analysis/AliasAnalysisCounter.cpp lib/Analysis/AliasDebugger.cpp lib/Analysis/BasicAliasAnalysis.cpp lib/Analysis/IPA/GlobalsModRef.cpp lib/Analysis/LibCallAliasAnalysis.cpp lib/Analysis/ScalarEvolutionAliasAnalysis.cpp lib/Analysis/TypeBasedAliasAnalysis.cpp lib/VMCore/LLVMContext.cpp

Dan Gohman gohman at apple.com
Thu Sep 16 17:15:39 PDT 2010


On Sep 15, 2010, at 6:24 PM, Chris Lattner wrote:

> On Sep 14, 2010, at 2:25 PM, Dan Gohman wrote:
>> 
>> +    explicit Location(const Value *P = 0,
> 
> Should the pointer be allowed to be null?  Is Location() something that is useful?

It's convenient, though not necessary.

> 
> 
>> +  /// pointsToConstantMemory - If the specified memory location is known to be
>> +  /// constant, return true.  This allows disambiguation of store
>>  /// instructions from constant pointers.
>>  ///
>> +  virtual bool pointsToConstantMemory(const Location &Loc);
> 
> Interesting.  I agree with the change, but I'll have to think about what this can be used for.

TBAA metadata can mark arbitrary memory as constant, which could
be more fine-grained than just marking global-variables constant.
It would be less precise than llvm.invariant.* though.

Dan





More information about the llvm-commits mailing list