Here's the RFC of the overflow builtins:
http://clang-developers.42468.n3.nabble.com/RFC-Introduce-overflow-builtins-td3838320.html
Along with the tracking issue: https://bugs.llvm.org/show_bug.cgi?id=12290
And the patch:
https://github.com/llvm-mirror/clang/commit/98d1ec1e99625176626b0bcd44cef7df6e89b289

There's also another patch that was added on top of this one which adds
more overflow builtins:
https://github.com/llvm-mirror/clang/commit/c41c63fbf84cc904580e733d1123d3b03bb5584c

It seems clear that this optimization could bring big performance
improvements on hot functions. It could also reduce binary size
substantially (we're talking about 14->5 instructions in their case).

Tristan

On 14/08/2017 15:58, Ben Kelly wrote:
> On Mon, Aug 14, 2017 at 6:11 AM, Till Schneidereit <
> t...@tillschneidereit.net> wrote:
>
>> On Mon, Aug 14, 2017 at 9:27 AM, Julian Seward <jsew...@acm.org> wrote:
>>
>>> On 13/08/17 03:40, Ehsan Akhgari wrote:
>>>> As you may have heard by now, Chromium has started to switch their
>>> Windows
>>>> builds to use clang-cl instead of MSVC [1].  This has improved their
>>>> Speedometer v2 benchmark score on x86 (but not on x86-64) by about 30%
>>>> according to AWFY [2].  [..]
>>> Do we have any insight into why the Clang version is so much faster?
>>> 30% strikes me as a large difference for two supposedly mature optimizing
>>> compilers.  And stranger still that it applies only for the 32-bit case.
>>> So I'm curious to know what's changed.
>>>
>> AFAICT, the real change is about 19%: shortly before the jump to ~103,
>> their score regressed from 86 to 78. I think using 86 as the baseline makes
>> much more sense. 19% is obviously still a substantial improvement from a
>> compiler change.
>>
> Google ran a bisect on the regression and improvements.  Here is some
> explanation of the regression:
>
> https://bugs.chromium.org/p/chromium/issues/detail?id=749359#c4
>
> The comment suggests that the change would see an improvement in clang
> since the code would then use class "overflow builtins".
>
> Its hard to tell if all of the clang-on-windows improvement is due to this
> same set of code or not.
>
> The bisects were run from this issue:
>
> https://bugs.chromium.org/p/chromium/issues/detail?id=750672#c12
>
> Ben
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform


_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to