[PATCH] D21636: [PM] LoopAccessInfo Refactor #2
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 30 10:05:06 PDT 2016
anemet added inline comments.
================
Comment at: include/llvm/Analysis/LoopAccessAnalysis.h:518-527
@@ -517,1 +517,12 @@
+ LoopAccessInfo(LoopAccessInfo &&LAI)
+ : PSE(std::move(LAI.PSE)), PtrRtChecking(std::move(LAI.PtrRtChecking)),
+ DepChecker(std::move(LAI.DepChecker)), TheLoop(LAI.TheLoop), DL(LAI.DL),
+ TLI(LAI.TLI), AA(LAI.AA), DT(LAI.DT), LI(LAI.LI),
+ NumLoads(LAI.NumLoads), NumStores(LAI.NumStores),
+ MaxSafeDepDistBytes(LAI.MaxSafeDepDistBytes), CanVecMem(LAI.CanVecMem),
+ StoreToLoopInvariantAddress(LAI.StoreToLoopInvariantAddress),
+ Report(std::move(LAI.Report)),
+ SymbolicStrides(std::move(LAI.SymbolicStrides)),
+ StrideSet(std::move(LAI.StrideSet)) {}
+
----------------
How are these different from the default move ctor/assignment operator?
================
Comment at: include/llvm/Analysis/LoopAccessAnalysis.h:633
@@ -598,2 +632,3 @@
/// associated with this predicate.
- PredicatedScalarEvolution PSE;
+ PredicatedScalarEvolution &getPSE() const { return *PSE; }
+ std::unique_ptr<PredicatedScalarEvolution> PSE;
----------------
Hmm, const member returning a non-const reference?
================
Comment at: include/llvm/Analysis/LoopAccessAnalysis.h:634
@@ -600,1 +633,3 @@
+ PredicatedScalarEvolution &getPSE() const { return *PSE; }
+ std::unique_ptr<PredicatedScalarEvolution> PSE;
----------------
Can we make this private now?
================
Comment at: include/llvm/Analysis/LoopAccessAnalysis.h:770-780
@@ -734,2 +769,13 @@
+class LoopAccessInfoAnalysis
+ : public AnalysisInfoMixin<LoopAccessInfoAnalysis> {
+ friend AnalysisInfoMixin<LoopAccessInfoAnalysis>;
+ static char PassID;
+
+public:
+ typedef LoopAccessInfo Result;
+ Result run(Loop &, AnalysisManager<Loop> &);
+ static StringRef name() { return "LoopAccessInfoAnalysis"; }
+};
+
inline Instruction *MemoryDepChecker::Dependence::getSource(
----------------
Does this belong to this patch?
http://reviews.llvm.org/D21636
More information about the llvm-commits
mailing list