[llvm-commits] [llvm] r80452 - /llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp

Dan Gohman gohman at apple.com
Sat Aug 29 16:36:57 PDT 2009


Author: djg
Date: Sat Aug 29 18:36:57 2009
New Revision: 80452

URL: http://llvm.org/viewvc/llvm-project?rev=80452&view=rev
Log:
Add some comments.

Modified:
    llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp

Modified: llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp?rev=80452&r1=80451&r2=80452&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp Sat Aug 29 18:36:57 2009
@@ -69,9 +69,14 @@
   return false;
 }
 
+/// GetUnderlyingIdentifiedObject - Given an expression, try to find an
+/// "identified object" (see AliasAnalysis::isIdentifiedObject) base
+/// value. Return null is none was found.
 Value *
 ScalarEvolutionAliasAnalysis::GetUnderlyingIdentifiedObject(const SCEV *S) {
   if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
+    // In an addrec, assume that the base will be in the start, rather
+    // than the step.
     return GetUnderlyingIdentifiedObject(AR->getStart());
   } else if (const SCEVAddExpr *A = dyn_cast<SCEVAddExpr>(S)) {
     // If there's a pointer operand, it'll be sorted at the end of the list.





More information about the llvm-commits mailing list