[PATCH] D49982: [TailCallElim] Preserve DT and PDT
Chijun Sima via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 2 10:55:04 PDT 2018
NutshellySima added inline comments.
================
Comment at: lib/Transforms/Scalar/TailRecursionElimination.cpp:826
+ auto *PDT = PDTWP ? &PDTWP->getPostDomTree() : nullptr;
+ DomTreeUpdater DTU(DT, PDT, DomTreeUpdater::UpdateStrategy::Eager);
+
----------------
kuhar wrote:
> Why is Eager better than Lazy here?
I ran `opt` using the newPM O3 pipeline using both strategies on three bitcode files (clang-preopt/clang-opt/SQLite), and observed a performance difference of approximately 0.1%, which can be considered as noise.
There is actually no strong preference of using either one because both work fine from my test. (After applying D50173).
So I'd better left it not commented.
================
Comment at: lib/Transforms/Scalar/TailRecursionElimination.cpp:857
+ auto *PDT = AM.getCachedResult<PostDominatorTreeAnalysis>(F);
+ DomTreeUpdater DTU(DT, PDT, DomTreeUpdater::UpdateStrategy::Eager);
+ bool Changed = eliminateTailRecursion(F, &TTI, &AA, &ORE, DTU);
----------------
kuhar wrote:
> Same as above.
Same as above.
https://reviews.llvm.org/D49982
More information about the llvm-commits
mailing list