[llvm] r291609 - CodeGen: Allow small copyable blocks to "break" the CFG.

Kyle Butt via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 19:13:40 PST 2017


On Tue, Jan 10, 2017 at 6:29 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:

>
> > On Jan 10, 2017, at 15:04, Kyle Butt via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> >
> > Author: iteratee
> > Date: Tue Jan 10 17:04:30 2017
> > New Revision: 291609
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=291609&view=rev
> > Log:
> > CodeGen: Allow small copyable blocks to "break" the CFG.
> >
> > When choosing the best successor for a block, ordinarily we would have
> preferred
> > a block that preserves the CFG unless there is a strong probability the
> other
> > direction. For small blocks that can be duplicated we now skip that
> requirement
> > as well.
> >
> > Differential revision: https://reviews.llvm.org/D27742
>
> Hi,
>
> This has caused a code quality regression for me. Attached is a reduced
> testcase. This patch caused a net gain of 2 branches and a compare
> instruction. Any idea on how to fix it?
>
>
I looked at the code in question. There are more compare instructions, but
no codepath should execute more of them. Which codepath are you concerned
about?

For the compare, and 1 of the branches, it occurs due to tail duplication,
and so for those, this is not a regression, it is WAI.

Are you worried about the code size, or did this actually cause a
performance regression?
If it did cause a regression, can you tell me which path is the hot path?

> -Matt
>
>
Thanks,
Kyle.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170110/11f15edb/attachment.html>


More information about the llvm-commits mailing list