[PATCH] D91335: [DivergenceAnalysis] Use addRequiredTransitive

Piotr Sobczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 04:35:34 PST 2020


piotr created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
piotr requested review of this revision.

For querying divergence the chained analysis passes are required
to be alive, for instance LoopInfoWrapperPass.

Ensure that by using addRequiredTransitive.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91335

Files:
  llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp


Index: llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp
===================================================================
--- llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp
+++ llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp
@@ -299,9 +299,9 @@
 }
 
 void LegacyDivergenceAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
-  AU.addRequired<DominatorTreeWrapperPass>();
-  AU.addRequired<PostDominatorTreeWrapperPass>();
-  AU.addRequired<LoopInfoWrapperPass>();
+  AU.addRequiredTransitive<DominatorTreeWrapperPass>();
+  AU.addRequiredTransitive<PostDominatorTreeWrapperPass>();
+  AU.addRequiredTransitive<LoopInfoWrapperPass>();
   AU.setPreservesAll();
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91335.304781.patch
Type: text/x-patch
Size: 665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201112/04608c47/attachment.bin>


More information about the llvm-commits mailing list