[PATCH] D46893: [CVP] Require DomTree for new Pass Manager

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 15 17:14:32 PDT 2018


chandlerc added inline comments.


================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:760-763
+  // Ensure we have a domtree, it is required but used through SimplifyQuery
+  AM.getResult<DominatorTreeAnalysis>(F);
+
   bool Changed = runImpl(F, LVI, getBestSimplifyQuery(AM, F));
----------------
I really don't like this use of getBestSimplifyQuery. I would strongly suggest passing the analyses you want to pass into SimplifyQuery. Not doing that makes the pass subtly dependent on pass ordering and other vagaries.


https://reviews.llvm.org/D46893





More information about the llvm-commits mailing list