[PATCH] D17477: [Polly] [RFC] Allow the client of DependenceInfo to obtain dependences at different granularities.

Hongbin Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 20:02:57 PST 2016


etherzhhb added inline comments.

================
Comment at: lib/Analysis/DependenceInfo.cpp:797
@@ -775,3 +796,3 @@
 void DependenceInfo::getAnalysisUsage(AnalysisUsage &AU) const {
   ScopPass::getAnalysisUsage(AU);
 }
----------------
etherzhhb wrote:
> etherzhhb wrote:
> > Meinersbur wrote:
> > > ScopPass::getAnalysisUsage(AU) 
> > > adds 
> > > addRequired<ScopInfo>();
> > > what you'd need with this change is
> > > addRequiredTransitive<ScopInfo>();
> > > 
> > > To avoid transitive requirements, I suggest per-granularity DependenceInfo passes:
> > > DependenceInfo(Dependences::AnalysisLevel) {} 
> > > ScopPass::getAnalysisUsage(AU) 
> > > adds 
> > > addRequired<ScopInfo>();
> > > what you'd need with this change is
> > > addRequiredTransitive<ScopInfo>();
> > 
> > I am confused, could you explain a little bit?
> > 
> > I guess even with the previous DependenceInfo, we also need 'addRequiredTransitive<ScopInfo>();'
> > 
> > Otherwise, why the previous DependenceInfo do not need this, but this change need 'addRequiredTransitive<ScopInfo>();'?
> > To avoid transitive requirements, I suggest per-granularity DependenceInfo passes:
> > DependenceInfo(Dependences::AnalysisLevel) {}
> 
> This can also be done, but I need to figure out some implementation details.
>>ScopPass::getAnalysisUsage(AU) 
>>adds 
>>addRequired<ScopInfo>();
>>what you'd need with this change is
>>addRequiredTransitive<ScopInfo>();
>I am confused, could you explain a little bit?
>
>I guess even with the previous DependenceInfo, we also need 'addRequiredTransitive<ScopInfo>();'

>Otherwise, why the previous DependenceInfo do not need this, but this change need 'addRequiredTransitive<ScopInfo>();'?

I think I know why.

Because originally we compute Dependences in runOnScop, when we call printScop/getDependences, we simply return the calculated Dependences, the Scop do not need to present.

However, practically, all Scop analyses should  "addRequiredTransitive<ScopInfo>();", since they are all calculated based on the Scop. If the Scop is invalided, the corresponding analysis results should also be invalided. Especially when the Scop is invalided by the transformations that change CFG and/or memory access behaviors.



Repository:
  rL LLVM

http://reviews.llvm.org/D17477





More information about the llvm-commits mailing list