[llvm] r219517 - This patch de-pessimizes the calculation of loop trip counts in
Hans Wennborg
hans at chromium.org
Thu Nov 20 12:50:54 PST 2014
On Thu, Nov 20, 2014 at 12:20 PM, Philip Reames
<listmail at philipreames.com> wrote:
>
> On 11/20/2014 12:07 PM, Mark Heffernan wrote:
>
> Rolling back this CL which just improves analysis precision (trip count
> computation specifically) is probably not the right approach.
>
> Strongly, strongly agreed with this point.
Right, I wasn't suggesting that we roll back. I'm not that
revert-trigger happy :)
I just wanted to report our binary size findings and was curious to
hear more from Mark about his commit.
I agree that this mostly seems like a bug fix, and if we have problems
with unrolling we should probably look at the thresholds. In an ideal
world our builds should be guided by profiles, but we're not there
yet.
Thanks,
Hans
> On Thu, Nov 20, 2014 at 11:13 AM, Hans Wennborg <hans at chromium.org> wrote:
>>
>> Sorry for reviving an old thread.
>>
>> On Fri, Oct 10, 2014 at 10:39 AM, Mark Heffernan <meheff at google.com>
>> wrote:
>> > Author: meheff
>> > Date: Fri Oct 10 12:39:11 2014
>> > New Revision: 219517
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=219517&view=rev
>> > Log:
>> > This patch de-pessimizes the calculation of loop trip counts in
>> > ScalarEvolution in the presence of multiple exits. Previously all
>> > loops exits had to have identical counts for a loop trip count to be
>> > considered computable. This pessimization was implemented by calling
>> > getBackedgeTakenCount(L) rather than getExitCount(L, ExitingBlock)
>> > inside of ScalarEvolution::getSmallConstantTripCount() (see the FIXME
>> > in the comments of that function). The pessimization was added to fix
>> > a corner case involving undefined behavior (pr/16130). This patch more
>> > precisely handles the undefined behavior case allowing the pessimization
>> > to be removed.
>>
>> This caused a 50 k regression in Chromium's binary size due to more
>> unrolling. I suspect it's something we'll have to take, but was
>> wondering if you have any numbers showing performance benefit here?
>>
>> Thanks,
>> Hans
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
More information about the llvm-commits
mailing list