r205436 - Extend the SSE2 comment lexing to AVX2. Only 16byte align when not on AVX2.

Richard Smith richard at metafoo.co.uk
Thu Apr 3 13:54:28 PDT 2014


On Thu, Apr 3, 2014 at 4:04 AM, Stephen Canon <scanon at apple.com> wrote:

> On Apr 2, 2014, at 3:14 PM, Chris Lattner <clattner at apple.com> wrote:
>
> > On Apr 2, 2014, at 12:14 PM, Chris Lattner <clattner at apple.com> wrote:
> >
> >> On Apr 2, 2014, at 10:27 AM, Roman Divacky <rdivacky at freebsd.org>
> wrote:
> >>
> >>> Author: rdivacky
> >>> Date: Wed Apr  2 12:27:03 2014
> >>> New Revision: 205436
> >>>
> >>> URL: http://llvm.org/viewvc/llvm-project?rev=205436&view=rev
> >>> Log:
> >>> Extend the SSE2 comment lexing to AVX2. Only 16byte align when not on
> AVX2.
> >>>
> >>> This provides some 3% speedup when preprocessing gcc.c as a single
> file.
> >>
> >> Nice!
> >
> > I haven't looked closely at them, but would any of the SSE 4.2 "string
> processing" instructions be helpful here?
>
> For simply scanning for '/', SSE4.2 won't be a win; it's usually not
> significantly faster than PCMPEQB + PMOVMSKB in strchr-type loops.
>
> One could use it to search for "*/" instead, which would be somewhat more
> interesting.


It would, alas, not be correct. There can be escaped newlines between the *
and the /.


>  There's no 32B VPCMPESTRI however, so if there aren't many false-positive
> '/' characters in block comments (I expect this to be the case), then using
> AVX2 to scan for '/' should still win.
>
> - Steve
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140403/c11eb6b7/attachment.html>


More information about the cfe-commits mailing list