This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: libcpp speedup patch: tweak _cpp_clean_line
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 Dec 2006 00:14:01 -0800
- Subject: Re: PATCH RFA: libcpp speedup patch: tweak _cpp_clean_line
- References: <m3sleztyaw.fsf@localhost.localdomain>
Ian Lance Taylor wrote:
> 2006-12-28 Ian Lance Taylor <iant@google.com>
>
> * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't
> look backward at the end of the line unless we saw a backslash.
Nice. I think:
> + if (__builtin_expect (c == '\n', 0)
would be better written with true/false as the second argument, since
these are booleans, but that's just style, and I haven't checked to see
if libcpp uses bool elsewhere. OK with or without that change.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713