This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFA: libcpp speedup patch: tweak _cpp_clean_line


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]