[PATCH] D49982: [TailCallElim] Preserve DT and PDT
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 2 08:51:38 PDT 2018
kuhar added inline comments.
================
Comment at: lib/Transforms/Scalar/TailRecursionElimination.cpp:596
}
+ DTU.recalculate(*NewEntry->getParent());
}
----------------
Can you add a comment explaining why we have to recalculate here?
================
Comment at: lib/Transforms/Scalar/TailRecursionElimination.cpp:826
+ auto *PDT = PDTWP ? &PDTWP->getPostDomTree() : nullptr;
+ DomTreeUpdater DTU(DT, PDT, DomTreeUpdater::UpdateStrategy::Eager);
+
----------------
Why is Eager better than Lazy here?
================
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);
----------------
Same as above.
https://reviews.llvm.org/D49982
More information about the llvm-commits
mailing list