[llvm] r274934 - [PM] name the new PM LAA class LoopAccessAnalysis (LAA) /NFC

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 14:21:44 PDT 2016


Author: davidxl
Date: Fri Jul  8 16:21:44 2016
New Revision: 274934

URL: http://llvm.org/viewvc/llvm-project?rev=274934&view=rev
Log:
[PM] name the new PM LAA class LoopAccessAnalysis (LAA) /NFC

Modified:
    llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
    llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
    llvm/trunk/lib/Passes/PassRegistry.def

Modified: llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h?rev=274934&r1=274933&r2=274934&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h Fri Jul  8 16:21:44 2016
@@ -772,16 +772,22 @@ private:
   LoopInfo *LI;
 };
 
-/// \brief LoopAccessInfoAnalysis
-class LoopAccessInfoAnalysis
-    : public AnalysisInfoMixin<LoopAccessInfoAnalysis> {
-  friend AnalysisInfoMixin<LoopAccessInfoAnalysis>;
+/// \brief This analysis provides dependence information for the memory
+/// accesses of a loop.
+///
+/// It runs the analysis for a loop on demand.  This can be initiated by
+/// querying the loop access info via AM.getResult<LoopAccessAnalysis>. 
+/// getResult return a LoopAccessInfo object.  See this class for the
+/// specifics of what information is provided.
+class LoopAccessAnalysis
+    : public AnalysisInfoMixin<LoopAccessAnalysis> {
+  friend AnalysisInfoMixin<LoopAccessAnalysis>;
   static char PassID;
 
 public:
   typedef LoopAccessInfo Result;
   Result run(Loop &, AnalysisManager<Loop> &);
-  static StringRef name() { return "LoopAccessInfoAnalysis"; }
+  static StringRef name() { return "LoopAccessAnalysis"; }
 };
 
 /// \brief Printer pass for the \c LoopAccessInfo results.

Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=274934&r1=274933&r2=274934&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Fri Jul  8 16:21:44 2016
@@ -2024,9 +2024,9 @@ INITIALIZE_PASS_DEPENDENCY(DominatorTree
 INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
 INITIALIZE_PASS_END(LoopAccessLegacyAnalysis, LAA_NAME, laa_name, false, true)
 
-char LoopAccessInfoAnalysis::PassID;
+char LoopAccessAnalysis::PassID;
 
-LoopAccessInfo LoopAccessInfoAnalysis::run(Loop &L, AnalysisManager<Loop> &AM) {
+LoopAccessInfo LoopAccessAnalysis::run(Loop &L, AnalysisManager<Loop> &AM) {
   const AnalysisManager<Function> &FAM =
       AM.getResult<FunctionAnalysisManagerLoopProxy>(L).getManager();
   Function &F = *L.getHeader()->getParent();
@@ -2051,7 +2051,7 @@ LoopAccessInfo LoopAccessInfoAnalysis::r
 PreservedAnalyses LoopAccessInfoPrinterPass::run(Loop &L,
                                                  AnalysisManager<Loop> &AM) {
   Function &F = *L.getHeader()->getParent();
-  auto &LAI = AM.getResult<LoopAccessInfoAnalysis>(L);
+  auto &LAI = AM.getResult<LoopAccessAnalysis>(L);
   OS << "Loop access info in function '" << F.getName() << "':\n";
   OS.indent(2) << L.getHeader()->getName() << ":\n";
   LAI.print(OS, 4);

Modified: llvm/trunk/lib/Passes/PassRegistry.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassRegistry.def?rev=274934&r1=274933&r2=274934&view=diff
==============================================================================
--- llvm/trunk/lib/Passes/PassRegistry.def (original)
+++ llvm/trunk/lib/Passes/PassRegistry.def Fri Jul  8 16:21:44 2016
@@ -176,7 +176,7 @@ FUNCTION_PASS("verify<regions>", RegionI
 #define LOOP_ANALYSIS(NAME, CREATE_PASS)
 #endif
 LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
-LOOP_ANALYSIS("access-info", LoopAccessInfoAnalysis())
+LOOP_ANALYSIS("access-info", LoopAccessAnalysis())
 #undef LOOP_ANALYSIS
 
 #ifndef LOOP_PASS




More information about the llvm-commits mailing list