[PATCH] D65310: [JumpThreading] In updatePredecessorProfileMetadata, stop searching predecessor when the current bb is an unreachable single bb loop
Wei Mi via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 11:53:44 PDT 2019
On Fri, Jul 26, 2019 at 11:34 AM Eli Friedman via Phabricator <
reviews at reviews.llvm.org> wrote:
> efriedma added subscribers: NutshellySima, brzycki.
> efriedma added a comment.
>
> Please rebase against trunk.
>
>
>
> ================
> Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:1214
> if (PN->getParent() == BB && isa<BranchInst>(BB->getTerminator()))
> - updatePredecessorProfileMetadata(PN, BB);
> + updatePredecessorProfileMetadata(PN, BB, DTU->getDomTree());
>
> ----------------
> Calling getDomTree() here is expensive; it flushes all updates in the
> DomTreeUpdater.
>
>
Or I can detect loop using a set keeping nodes which have been visited.
Whenever SinglePredBB is seen in the set, stop searching.
>
> Repository:
> rL LLVM
>
> CHANGES SINCE LAST ACTION
> https://reviews.llvm.org/D65310/new/
>
> https://reviews.llvm.org/D65310
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190726/5a7efa5a/attachment.html>
More information about the llvm-commits
mailing list