http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53525

--- Comment #2 from jimis <jimis at gmx dot net> 2012-05-30 04:44:54 UTC ---
According to valgrind major overhead is due to numerous calls of
line-map.c:linemap_line_start() that actually allocate new line_maps. This
happens because we are resetting the max_column_hint whenever we enter macro
context in enter_macro_context()->linemap_enter_macro(). 

The following one-liner seems to resolve this, as run time is improved by about
7ms or 45 M Instr.


=== modified file 'libcpp/line-map.c'
--- libcpp/line-map.c   2012-04-30 11:42:12 +0000
+++ libcpp/line-map.c   2012-05-27 06:52:08 +0000
@@ -331,7 +331,6 @@ linemap_enter_macro (struct line_maps *s
          num_tokens * sizeof (source_location));

   LINEMAPS_MACRO_CACHE (set) = LINEMAPS_MACRO_USED (set) - 1;
-  set->max_column_hint = 0;

   return map;
 }

Reply via email to