------- Comment #18 from rguenth at gcc dot gnu dot org 2008-01-07 13:25 ------- Most of the operand scanner time is caused by cfg_cleanup:
tree CFG cleanup : 93.71 (79%) usr 1.16 (54%) sys 95.03 (78%) wall 474427 kB (28%) ggc globbing CFG cleanup (and operand scanner) time to the passes that trigger it reveals: tree PHI const/copy prop: 27.30 (16%) usr 0.27 ( 9%) sys 31.33 (16%) wall 9 kB ( 0%) ggc tree FRE : 25.01 (15%) usr 0.75 (25%) sys 27.63 (14%) wall 1061857 kB (62%) ggc complete unrolling : 100.00 (59%) usr 1.46 (49%) sys 111.81 (58%) wall 482221 kB (28%) ggc wheee ;) looking where we spend most of the time it seems to be building tree lists in ssa_redirect_edge. I have a hack to make this a single allocation of a VEC on the heap, still in cfg_cleanup remove_forwarder_block_with_phi there is a linear search(!) in the list of pending PHI args. Profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls s/call s/call name 48.75 52.85 52.85 2734252 0.00 0.00 ggc_alloc_stat 11.07 64.85 12.00 35486689 0.00 0.00 add_vars_for_offset 4.22 69.42 4.57 327924414 0.00 0.00 var_ann 3.89 73.64 4.22 138084 0.00 0.00 finalize_ssa_stmt_operands 3.22 77.13 3.49 44525266 0.00 0.00 add_virtual_operand ... the add_vars_for_offset is PR33870 related. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34683