This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Big find_cross_jump performance regression.
- To: gcc at gcc dot gnu dot org
- Subject: Big find_cross_jump performance regression.
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Sun, 21 May 2000 14:02:03 -0500 (EST)
- Cc: lucier at math dot purdue dot edu (Brad Lucier), feeley at iro dot umontreal dot ca
There has been a tremendous performance regression in find_cross_jump
from gcc version 2.96 20000511 to gcc version 2.96 20000519. With
this file:
http://www.math.purdue.edu/~lucier/new_t-c-2.i.gz
(This is a different version of _t-c-2.i.gz; this one uses only one
computed goto at the top of the file instead of many (hundreds? thousands?)
distributed throughout the file.)
I get with 2.96 20000511
popov-59% /export/u10/egcs-profile/lib/gcc-lib/alphaev6-unknown-linux-gnu/2.96/cc1 -fpic -fno-math-errno -mieee -mcpu=ev6 -O1 _t-c-2.i
__copysignf copysignf __copysign copysign __fabsf fabsf __fabs fabs __floorf __floor floorf floor __fdimf fdimf __fdim fdim ___H__20___t_2d_c_2d_2 {GC 41621k -> 7908k} {GC 11860k -> 8370k} {GC 11507k -> 8710k} ___init_proc {GC 21763k -> 2096k} ____20___t_2d_c_2d_2
Execution times (seconds)
garbage collection : 0.61 ( 2%) usr 0.00 ( 2%) sys 0.61 ( 2%) wall
parser : 5.57 (22%) usr 0.15 (63%) sys 5.72 (22%) wall
varconst : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
integration : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
jump : 5.29 (21%) usr 0.01 ( 5%) sys 5.30 (21%) wall
CSE : 1.88 ( 7%) usr 0.00 ( 0%) sys 1.88 ( 7%) wall
global CSE : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
loop analysis : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
CSE 2 : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
flow analysis : 1.42 ( 6%) usr 0.01 ( 6%) sys 1.44 ( 6%) wall
combiner : 2.07 ( 8%) usr 0.00 ( 0%) sys 2.06 ( 8%) wall
if-conversion : 0.14 ( 1%) usr 0.01 ( 5%) sys 0.16 ( 1%) wall
local alloc : 1.00 ( 4%) usr 0.00 ( 0%) sys 1.00 ( 4%) wall
global alloc : 1.90 ( 7%) usr 0.02 (10%) sys 1.92 ( 8%) wall
reload CSE regs : 2.85 (11%) usr 0.00 ( 0%) sys 2.85 (11%) wall
flow 2 : 1.14 ( 5%) usr 0.00 ( 2%) sys 1.15 ( 4%) wall
if-conversion 2 : 0.13 ( 1%) usr 0.00 ( 4%) sys 0.14 ( 1%) wall
shorten branches : 0.08 ( 0%) usr 0.00 ( 1%) sys 0.08 ( 0%) wall
final : 0.40 ( 2%) usr 0.00 ( 1%) sys 0.41 ( 2%) wall
symout : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
rest of compilation : 0.84 ( 3%) usr 0.00 ( 0%) sys 0.83 ( 3%) wall
TOTAL : 25.43 0.24 25.67
and perfectly reasonable gprof output.
With 2.96 20000519 (+ Michael Matz's dominator calculation code,
which I'm testing and which seems to have nothing to do with the problem),
I get
popov-57% /export/u11/lucier/programs/egcs/profiled/gcc/cc1 -fpic -fno-math-errno -mieee -mcpu=ev6 -O1 _t-c-2.i
__copysignf copysignf __copysign copysign __fabsf fabsf __fabs fabs __floorf __floor floorf floor __fdimf fdimf __fdim fdim ___H__20___t_2d_c_2d_2 {GC 41622k -> 7909k} {GC 11861k -> 8371k} {GC 11507k -> 8711k} ___init_proc {GC 22919k -> 2097k} ____20___t_2d_c_2d_2
Execution times (seconds)
garbage collection : 0.57 ( 0%) usr 0.00 ( 0%) sys 0.58 ( 0%) wall
parser : 5.48 ( 0%) usr 0.15 (32%) sys 5.65 ( 0%) wall
varconst : 0.02 ( 0%) usr 0.00 ( 0%) sys 0.02 ( 0%) wall
integration : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
jump :1866.16 (99%) usr 0.24 (52%) sys1865.85 (99%) wall
CSE : 1.89 ( 0%) usr 0.00 ( 0%) sys 1.90 ( 0%) wall
loop analysis : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
CSE 2 : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
flow analysis : 1.38 ( 0%) usr 0.01 ( 2%) sys 1.39 ( 0%) wall
combiner : 2.06 ( 0%) usr 0.00 ( 0%) sys 2.06 ( 0%) wall
if-conversion : 0.06 ( 0%) usr 0.00 ( 2%) sys 0.07 ( 0%) wall
local alloc : 1.00 ( 0%) usr 0.00 ( 0%) sys 1.00 ( 0%) wall
global alloc : 1.93 ( 0%) usr 0.03 ( 6%) sys 1.98 ( 0%) wall
reload CSE regs : 2.79 ( 0%) usr 0.00 ( 0%) sys 2.79 ( 0%) wall
flow 2 : 1.18 ( 0%) usr 0.00 ( 2%) sys 1.19 ( 0%) wall
if-conversion 2 : 0.04 ( 0%) usr 0.00 ( 1%) sys 0.05 ( 0%) wall
shorten branches : 0.09 ( 0%) usr 0.00 ( 0%) sys 0.09 ( 0%) wall
final : 0.47 ( 0%) usr 0.00 ( 1%) sys 0.47 ( 0%) wall
symout : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
rest of compilation : 0.84 ( 0%) usr 0.00 ( 0%) sys 0.84 ( 0%) wall
TOTAL :1886.06 0.46 1886.00
with gprof output:
Flat profile:
Each sample counts as 0.000976562 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
52.46 416.80 416.80 615228114 0.00 0.00 rtx_renumbered_equal_p
31.09 663.79 246.99 313010502 0.00 0.00 find_cross_jump
5.63 708.51 44.72 745484706 0.00 0.00 find_reg_note
5.10 749.06 40.55 10 4054.88 78514.46 jump_optimize_1
3.63 777.91 28.85 618507521 0.00 0.00 prev_nonnote_insn
0.27 780.03 2.12 9064811 0.00 0.00 active_insn_p
...
-----------------------------------------------
40.55 744.60 10/10 rest_of_compilation [5]
[6] 98.8 40.55 744.60 10 jump_optimize_1 [6]
246.99 491.93 313010502/313010502 find_cross_jump [7]
0.17 1.05 1051345/1051345 follow_jumps [14]
0.35 0.77 1203119/2361268 next_active_insn [11]
0.24 0.61 1319820/1319820 prev_active_insn [17]
0.01 0.75 38820/39712 redirect_jump [20]
0.50 0.00 3134022/4386733 simplejump_p [21]
0.25 0.21 1030603/1030603 jump_back_p [40]
0.21 0.00 2082733/2426655 condjump_p [57]
0.17 0.00 1030603/1078600 prev_real_insn [66]
0.03 0.10 10/10 mark_all_labels [85]
0.05 0.00 1051345/1051345 condjump_in_parallel_p [173]
0.04 0.00 761677/618507521 prev_nonnote_insn [10]
0.02 0.02 3/3 delete_noop_moves [207]
0.03 0.00 10/10 init_label_info [224]
0.02 0.00 10/10 delete_unreferenced_labels [253]
0.02 0.00 10/10 delete_barrier_successors [257]
0.02 0.00 10/10 exception_optimize [258]
0.00 0.01 406/406 do_cross_jump [293]
0.00 0.01 484/484 invert_jump [339]
0.00 0.00 35788/743056 single_set [169]
0.00 0.00 905/5251 delete_insn [323]
0.00 0.00 11/11 delete_computation [865]
0.00 0.00 22/59842 next_real_insn [344]
0.00 0.00 10/10 calculate_can_reach_end [951]
0.00 0.00 10/46608 max_reg_num [506]
0.00 0.00 11/11 delete_jump [986]
0.00 0.00 1/101473 side_effects_p [199]
0.00 0.00 1/745484706 find_reg_note [9]
0.00 0.00 750/750 no_labels_between_p [1083]
0.00 0.00 10/13 check_exception_handler_labels [1240]
-----------------------------------------------
246.99 491.93 313010502/313010502 jump_optimize_1 [6]
[7] 93.0 246.99 491.93 313010502 find_cross_jump [7]
416.80 0.00 615218718/615228114 rtx_renumbered_equal_p [8]
44.64 0.00 744134532/745484706 find_reg_note [9]
28.81 0.00 617736791/618507521 prev_nonnote_insn [10]
1.68 0.00 22356708/22823682 rtx_equal_p [13]
0.00 0.00 3654/1078600 prev_real_insn [66]
-----------------------------------------------
2084145595 rtx_renumbered_equal_p [8]
0.01 0.00 9396/615228114 jump_back_p [40]
416.80 0.00 615218718/615228114 find_cross_jump [7]
[8] 52.5 416.80 0.00 615228114+2084145595 rtx_renumbered_equal_p [8]
0.00 0.00 17824/59842 next_real_insn [344]
2084145595 rtx_renumbered_equal_p [8]
-----------------------------------------------
0.00 0.00 1/745484706 jump_optimize_1 [6]
0.00 0.00 1/745484706 dead_or_predicable [426]
0.00 0.00 4/745484706 single_set [169]
0.00 0.00 24/745484706 set_unique_reg_note [907]
0.00 0.00 52/745484706 find_dummy_reload [943]
0.00 0.00 69/745484706 record_reg_classes [101]
0.00 0.00 191/745484706 propagate_block_delete_insn [906]
0.00 0.00 242/745484706 flow_delete_insn [895]
0.00 0.00 254/745484706 find_if_case_2 [638]
0.00 0.00 484/745484706 invert_jump [339]
0.00 0.00 1122/745484706 estimate_probability [497]
0.00 0.00 1438/745484706 combine_regs [581]
0.00 0.00 1574/745484706 do_cross_jump [293]
0.00 0.00 3872/745484706 force_reg <cycle 3> [428]
0.00 0.00 4732/745484706 validate_equiv_mem [493]
0.00 0.00 5781/745484706 scan_one_insn [73]
0.00 0.00 8997/745484706 try_combine [24]
0.00 0.00 16573/745484706 update_equiv_regs [82]
0.00 0.00 16957/745484706 reload [23]
0.00 0.00 18528/745484706 cse_insn [30]
0.00 0.00 25006/745484706 block_alloc [99]
0.00 0.00 27471/745484706 reg_scan_mark_refs [105]
0.00 0.00 29822/745484706 can_combine_p [151]
0.00 0.00 44045/745484706 noop_move_p [347]
0.00 0.00 56262/745484706 delete_trivially_dead_insns [172]
0.00 0.00 56264/745484706 cse_basic_block [28]
0.01 0.00 125985/745484706 find_equiv_reg [301]
0.01 0.00 138857/745484706 propagate_one_insn [41]
0.05 0.00 765566/745484706 init_alias_analysis [43]
44.64 0.00 744134532/745484706 find_cross_jump [7]
[9] 5.6 44.72 0.00 745484706 find_reg_note [9]
-----------------------------------------------
0.00 0.00 2/618507521 noce_process_if_block [576]
0.00 0.00 7/618507521 merge_blocks_nomove [753]
0.00 0.00 406/618507521 get_label_before [651]
0.00 0.00 416/618507521 cse_insn [30]
0.00 0.00 1129/618507521 canonicalize_condition [738]
0.00 0.00 3011/618507521 set_label_offsets [356]
0.00 0.00 4082/618507521 thread_jumps [193]
0.04 0.00 761677/618507521 jump_optimize_1 [6]
28.81 0.00 617736791/618507521 find_cross_jump [7]
[10] 3.6 28.85 0.00 618507521 prev_nonnote_insn [10]
-----------------------------------------------
and I have no clue what is happening.
Brad Lucier