From ed77e52dd972ada58608f5540d3d0d434899114e Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sat, 29 Aug 2009 23:36:57 +0000 Subject: Add some comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80452 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ScalarEvolutionAliasAnalysis.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Analysis/ScalarEvolutionAliasAnalysis.cpp') diff --git a/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp b/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp index 381ea20486..cc79e6c3b1 100644 --- a/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp +++ b/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp @@ -69,9 +69,14 @@ ScalarEvolutionAliasAnalysis::runOnFunction(Function &F) { 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(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(S)) { // If there's a pointer operand, it'll be sorted at the end of the list. -- cgit v1.2.3