git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245015
91177308-0d34-0410-b5e6-
96231b3b80d8
-/// ScalarEvolutionAliasAnalysis - This is a simple alias analysis
-/// implementation that uses ScalarEvolution to answer queries.
+/// A simple alias analysis implementation that uses ScalarEvolution to answer
+/// queries.
class ScalarEvolutionAliasAnalysis : public FunctionPass, public AliasAnalysis {
ScalarEvolution *SE;
class ScalarEvolutionAliasAnalysis : public FunctionPass, public AliasAnalysis {
ScalarEvolution *SE;
*PassRegistry::getPassRegistry());
}
*PassRegistry::getPassRegistry());
}
- /// getAdjustedAnalysisPointer - This method is used when a pass implements
- /// an analysis interface through multiple inheritance. If needed, it
- /// should override this to adjust the this pointer as needed for the
- /// specified pass info.
+ /// This method is used when a pass implements an analysis interface through
+ /// multiple inheritance.
+ ///
+ /// If needed, it should override this to adjust the this pointer as needed
+ /// for the specified pass info.
void *getAdjustedAnalysisPointer(AnalysisID PI) override {
if (PI == &AliasAnalysis::ID)
return (AliasAnalysis *)this;
void *getAdjustedAnalysisPointer(AnalysisID PI) override {
if (PI == &AliasAnalysis::ID)
return (AliasAnalysis *)this;
Value *GetBaseValue(const SCEV *S);
};
Value *GetBaseValue(const SCEV *S);
};
-//===--------------------------------------------------------------------===//
-//
-// createScalarEvolutionAliasAnalysisPass - This pass implements a simple
-// alias analysis using ScalarEvolution queries.
-//
+/// Creates an instance of \c ScalarEvolutionAliasAnalysis.
FunctionPass *createScalarEvolutionAliasAnalysisPass();
}
FunctionPass *createScalarEvolutionAliasAnalysisPass();
}
-/// GetBaseValue - Given an expression, try to find a
-/// base value. Return null is none was found.
+/// Given an expression, try to find a base value.
+///
+/// Returns null if none was found.
Value *ScalarEvolutionAliasAnalysis::GetBaseValue(const SCEV *S) {
if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
// In an addrec, assume that the base will be in the start, rather
Value *ScalarEvolutionAliasAnalysis::GetBaseValue(const SCEV *S) {
if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
// In an addrec, assume that the base will be in the start, rather