[llvm] r219517 - This patch de-pessimizes the calculation of loop trip counts in

Hans Wennborg hans at chromium.org
Thu Nov 20 14:15:34 PST 2014


On Thu, Nov 20, 2014 at 1:57 PM, Mark Heffernan <meheff at google.com> wrote:
> On Thu, Nov 20, 2014 at 1:39 PM, Chandler Carruth <chandlerc at gmail.com>
> wrote:
>>
>> The way in which this would impact the unroller is by uncovering more
>> loops with a *constant* trip count that we can therefore fully unroll. This
>> shouldn't be profile guided and is strict goodness.
>
>
> With profile info you'd probably want to treat all cold code as -Os, so if a
> constant-trip-count loop is cold you wouldn't unroll because of the code
> size bloat.

Yes, that's what I was thinking. Some of the object files which had
the largest relative size increases were found in very remote corners
of the code base.

If we could use profile info to not unroll (or re-roll afterwards)
such loops, that would be great. Right now, I guess we're asking for
it by compiling everything with -O2.

 - Hans



More information about the llvm-commits mailing list