[Bug c/60291] slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs)

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 20 15:27:00 GMT 2014


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |compile-time-hog
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-20
     Ever confirmed|0                           |1

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.(In reply to Markus Trippelsdorf from comment #3)
> Perf shows:
> 
>  24.26%  cc1  cc1  [.] bitmap_set_bit(bitmap_head*, int)
>  20.88%  cc1  cc1  [.] mark_all_vars_used_1(tree_node**, int*, void*)

  /* Only need to mark VAR_DECLS; parameters and return results are not
     eliminated as unused.  */
  if (TREE_CODE (t) == VAR_DECL)
    {
      /* When a global var becomes used for the first time also walk its
         initializer (non global ones don't have any).  */
      if (set_is_used (t) && is_global_var (t))
        mark_all_vars_used (&DECL_INITIAL (t));

not sure why we do that .... (we've had such compile-time-hog in former
referenced-vars tracking as well).  That's quadratic if you refer to
a large global from all functions.

>  14.18%  cc1  cc1  [.] operand_equal_p(tree_node const*, tree_node const*,...
>   9.15%  cc1  cc1  [.] mem_attrs_eq_p(mem_attrs const*, mem_attrs const*)
>   4.17%  cc1  cc1  [.] walk_tree_1(tree_node**, tree_node*
> (*)(tree_node**,...
>   1.69%  cc1  cc1  [.] tree_block(tree_node*)



More information about the Gcc-bugs mailing list