[PATCH] D35528: [Dominators] Teach LoopUnswitch to use the incremental API

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 09:59:00 PDT 2017


It's unlikely to be measurable in any sense

On Tue, Jul 18, 2017, 9:56 AM Jakub Kuderski via Phabricator <
reviews at reviews.llvm.org> wrote:

> kuhar added inline comments.
>
>
> ================
> Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:939
> +  assert(isa<BranchInst>(loopPreheader->getTerminator()));
> +  auto *OldBranch = cast<BranchInst>(loopPreheader->getTerminator());
>    EmitPreheaderBranchOnCondition(Cond, Val, NewExit, NewPH,
> ----------------
> davide wrote:
> > instead of using isa<> + cast<> can you use `dyn_cast<>` maybe ?
> Wouldn't that be slower in release builds without assertions?
>
>
> https://reviews.llvm.org/D35528
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170718/217b05d2/attachment.html>


More information about the llvm-commits mailing list