[llvm-dev] Recent -Os code size regressions

Steve King via llvm-dev
Thu, 07 Jan 2016 18:16:11 -0000

Hi James, The code size problem is fixed.  Thanks for that!  I assume
the commit was this one:

Date:   Wed Dec 16 14:12:44 2015 +0000

    [SimplifyCFG] Don't create unnecessary PHIs

    In conditional store merging, we were creating PHIs when we didn't
    need to. If the value to be predicated isn't defined in the block
    we're predicating, then it doesn't need a PHI at all (because we
only
    deal with triangles and diamonds, any value not in the predicated BB
    must dominate the predicated BB).

    This fixes a large code size increase in some benchmarks in a
popular embedded benchmark suite.

    Now with a fix (and fixed tests) for the conformance issue seen in Chromium.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk at 255767
91177308-0d34-0410-b5e6-96231b3b80d8

Regards,
-steve


On Tue, Dec 1, 2015 at 2:11 PM, Steve King <steve at metrokings.com>
wrote:
> On Fri, Nov 20, 2015 at 5:06 PM, James Molloy <james at
jamesmolloy.co.uk> wrote:
>> Hi,
>>
>> We'd need to look precisely at what's causing the code size
bloat. The
>> midend commit pointed out by Steve shouldn't cause bloat in and of
itself -
>> it should reduce code size. It removes a load of stores and branches.
>>
>
> Hi James, Sounds like your patch should have been the best of both
> worlds, so can you investigate the -Os code size mystery?  Does the
> problem even occur in your tests?  If you don't have time, then
> Kevin's idea to bypass the problem for now with an optsize check makes
> sense to me.
>
> Regards,
> -steve