http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53880
--- Comment #24 from Markus Trippelsdorf <markus at trippelsdorf dot de>
2012-07-30 11:21:54 UTC ---
(In reply to comment #23)
> (In reply to comment #22)
> > Still a 98% compile time regression on todays trunk.
>
> What revision number is this? If it includes r189951, could you please see if
> you can get an updated profile (similar to the one in comment #3)?
I'm running revision 189954.
# Samples: 557K of event 'cycles'
# Event count (approx.): 448107030198
#
# Overhead Command Shared Object Symbol
97.54% cc1plus cc1plus [.] gt_pch_p_9line_maps
0.12% cc1plus cc1plus [.] htab_find_slot_with_hash
0.10% cc1plus libc-2.16.90.so [.] memcpy@@GLIBC_2.14
0.10% cc1plus cc1plus [.] htab_expand
0.09% cc1plus libc-2.16.90.so [.] malloc_consolidate
0.08% cc1plus cc1plus [.] htab_find_with_hash
0.08% cc1plus libc-2.16.90.so [.] msort_with_tmp.part.0
Zoom into gt_pch_p_9line_maps:
│ if ((*x).info_macro.maps != NULL) {
│ size_t i2;
│ for (i2 = 0; i2 != (size_t)(l2); i2++) {
4.10 │109: cmp %rcx,%rbx
3.86 │ nop
3.22 │ ↓ je 188
3.26 │112: mov 0x18(%rbp),%rax
3.21 │ add $0x1,%rbx
│ break;
│ }
│ }
│
│ void
│ gt_pch_p_9line_maps (ATTRIBUTE_UNUSED void *this_obj,
2.94 │11a: lea (%rbx,%rbx,4),%r15
3.69 │ shl $0x3,%r15
│ {
│ size_t l2 = (size_t)(((*x).info_macro).used);
│ if ((*x).info_macro.maps != NULL) {
│ size_t i2;
│ for (i2 = 0; i2 != (size_t)(l2); i2++) {
│ switch (((*x).info_macro.maps[i2]).reason ==
LC_ENTER_MACRO)
3.58 │ lea (%rax,%r15,1),%rdi
3.59 │ cmpb $0x4,0x4(%rdi)
4.26 │ ↑ jne 100
│ op (&((*x).info_macro.maps[i2].d.ordinary.to_file),
cookie);
│ break;
│ case 1:
│ {
│ union tree_node * x3 =
│ ((*x).info_macro.maps[i2].d.macro.macro) ?
HT_IDENT_TO_GCC_IDENT (HT_NODE (((*x).info_macro.maps[i2].d.macro.macro))) :
4.18 │ mov 0x8(%rdi),%rsi
4.07 │ xor %edx,%edx
2.28 │ lea -0x18(%rsi),%r8
2.28 │ test %rsi,%rsi
2.70 │ cmovne %r8,%rdx
│ if ((void *)((*x).info_macro.maps) == this_obj)
2.69 │ cmp %rax,%r14
│ if ((void *)((*x).info_macro.maps) == this_obj)
│ op (&((*x).info_macro.maps[i2].d.ordinary.to_file),
cookie);
│ break;
│ case 1:
│ {
│ union tree_node * x3 =
2.55 │ mov %rdx,0x18(%rsp)
│ ((*x).info_macro.maps[i2].d.macro.macro) ?
HT_IDENT_TO_GCC_IDENT (HT_NODE (((*x).info_macro.maps[i2].d.macro.macro))) :
│ if ((void *)((*x).info_macro.maps) == this_obj)
2.82 │ ↓ je 1a0
│ op (&(x3), cookie);
│ (*x).info_macro.maps[i2].d.macro.macro = (x3) ?
CPP_HASHNODE (GCC_IDENT_TO_HT_IDENT ((x3))) : NULL;
2.80 │147: lea 0x18(%rdx),%rsi
3.00 │ xor %eax,%eax
3.28 │ test %rdx,%rdx
3.11 │ cmovne %rsi,%rax
3.15 │ mov %rax,0x8(%rdi)
│ }
│ if ((*x).info_macro.maps[i2].d.macro.macro_locations
!= NULL) {
4.51 │ mov 0x18(%rbp),%rax
4.45 │ add %rax,%r15
4.94 │ cmpq $0x0,0x18(%r15)
3.74 │ ↑ je 109
│ if ((void *)((*x).info_macro.maps) == this_obj)
3.16 │ cmp %rax,%r14
3.03 │ ↑ jne 109
│ op
(&((*x).info_macro.maps[i2].d.macro.macro_locations), cookie);
│ mov %rcx,0x8(%rsp)
0.00 │ lea 0x18(%r15),%rdi
│ mov %r13,%rsi
│ → callq *%r12
0.00 │ mov 0x8(%rsp),%rcx
│ }