[PM/AA] Clean up the SCEV-AA comment formatting and typos.

llvm-svn: 245015
This commit is contained in:
Chandler Carruth 2015-08-14 03:14:50 +00:00
parent 79687faee6
commit 55eec8be9e
2 changed files with 11 additions and 13 deletions

View File

@ -23,8 +23,8 @@
namespace llvm { namespace llvm {
/// ScalarEvolutionAliasAnalysis - This is a simple alias analysis /// A simple alias analysis implementation that uses ScalarEvolution to answer
/// implementation that uses ScalarEvolution to answer queries. /// queries.
class ScalarEvolutionAliasAnalysis : public FunctionPass, public AliasAnalysis { class ScalarEvolutionAliasAnalysis : public FunctionPass, public AliasAnalysis {
ScalarEvolution *SE; ScalarEvolution *SE;
@ -35,10 +35,11 @@ public:
*PassRegistry::getPassRegistry()); *PassRegistry::getPassRegistry());
} }
/// getAdjustedAnalysisPointer - This method is used when a pass implements /// This method is used when a pass implements an analysis interface through
/// an analysis interface through multiple inheritance. If needed, it /// multiple inheritance.
/// should override this to adjust the this pointer as needed for the ///
/// specified pass info. /// If needed, it should override this to adjust the this pointer as needed
/// for the specified pass info.
void *getAdjustedAnalysisPointer(AnalysisID PI) override { void *getAdjustedAnalysisPointer(AnalysisID PI) override {
if (PI == &AliasAnalysis::ID) if (PI == &AliasAnalysis::ID)
return (AliasAnalysis *)this; return (AliasAnalysis *)this;
@ -54,11 +55,7 @@ private:
Value *GetBaseValue(const SCEV *S); Value *GetBaseValue(const SCEV *S);
}; };
//===--------------------------------------------------------------------===// /// Creates an instance of \c ScalarEvolutionAliasAnalysis.
//
// createScalarEvolutionAliasAnalysisPass - This pass implements a simple
// alias analysis using ScalarEvolution queries.
//
FunctionPass *createScalarEvolutionAliasAnalysisPass(); FunctionPass *createScalarEvolutionAliasAnalysisPass();
} }

View File

@ -48,8 +48,9 @@ bool ScalarEvolutionAliasAnalysis::runOnFunction(Function &F) {
return false; return false;
} }
/// GetBaseValue - Given an expression, try to find a /// Given an expression, try to find a base value.
/// base value. Return null is none was found. ///
/// Returns null if none was found.
Value *ScalarEvolutionAliasAnalysis::GetBaseValue(const SCEV *S) { Value *ScalarEvolutionAliasAnalysis::GetBaseValue(const SCEV *S) {
if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) { if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
// In an addrec, assume that the base will be in the start, rather // In an addrec, assume that the base will be in the start, rather