On Fri, 2013-08-30 at 15:44 +0200, Michael Matz wrote: > Hi, > > On Thu, 29 Aug 2013, David Malcolm wrote: > > > Successfully bootstrapped and tested on x86_64-unknown-linux-gnu: all > > testcases show the same results as an unpatched build (relative to > > r202029). > > I'd like to see some statistics for cc1{,plus} codesize and for compile > time of something reasonably large (needing say 60 seconds to > compile normally), before/after patch series.
Here's the result of a pair of builds of r202029 without and with the patches, configured with --enable-checking=release, running "make", then stripping debuginfo [1] # ll */build/gcc/cc1 -rwxr-xr-x. 1 root root 13230048 Aug 30 15:00 control/build/gcc/cc1 -rwxr-xr-x. 1 root root 13230144 Aug 30 15:00 experiment/build/gcc/cc1 (98 bytes difference) # ll */build/gcc/cc1obj -rwxr-xr-x. 1 root root 13426336 Aug 30 15:00 control/build/gcc/cc1obj -rwxr-xr-x. 1 root root 13426432 Aug 30 15:00 experiment/build/gcc/cc1obj (96 bytes diff) # ll */build/gcc/cc1plus -rwxr-xr-x. 1 root root 14328480 Aug 29 13:59 control/build/gcc/cc1plus -rwxr-xr-x. 1 root root 14328608 Aug 29 13:59 experiment/build/gcc/cc1plus (128 bytes diff) # ll */build/gcc/f951 -rwxr-xr-x. 1 root root 13960728 Aug 30 15:05 control/build/gcc/f951 -rwxr-xr-x. 1 root root 13960856 Aug 30 15:05 experiment/build/gcc/f951 (128 bytes diff) # ll */build/gcc/jc1 -rwxr-xr-x. 1 root root 12607704 Aug 30 15:17 control/build/gcc/jc1 -rwxr-xr-x. 1 root root 12607704 Aug 30 15:17 experiment/build/gcc/jc1 (the same size) So the overall sizes of such binaries are essentially unchanged. To dig a bit deeper, I extended my asmdiff tool [2] to compare sizes of functions; I'm attaching the results of comparing cc1plus before/after. Any suggestions on what to compile to compare performance? By 60 seconds, do you mean 60s for one TU, or do you mean a large build e.g. the linux kernel? > And the manual GTY markers are so not maintainable in the long run, > gengtype or something else really needs to be taught to create them > automatically. Apart from the GTY aspect, how do people feel about the patch series? FWIW I have vague thoughts about doing something similar for tree - doing so *might* give an easier route to the type vs expression separation that Andrew spoke about at the Cauldron rearchitecture BoF. (I started looking at doing a similar C++-ification of rtx, but... gahhhhh) Dave [1] yes, I built as root; this was done on a throwaway provisioning of a RHEL 6.4 x86_64 box. [2] https://github.com/davidmalcolm/asmdiff
Old: test/control/build/gcc/cc1plus New: test/experiment/build/gcc/cc1plus Function removed: Function('_start-0x1a684') Function removed: Function('gt_pch_p_18gimple_statement_d(void*, void*, void (*)(void*, void*), void*)') Function removed: Function('gt_ggc_mx_gimple_statement_d(void*)') Function removed: Function('gt_pch_nx_gimple_statement_d(void*)') Function removed: Function('vec<constraint_expr, va_heap, vl_ptr>::safe_push(constraint_expr const&)') Function added: Function('_start-0x1a6ac') Function added: Function('gt_ggc_mx(gimple_statement_base*)') Function added: Function('gt_pch_nx(gimple_statement_base*)') Function added: Function('gt_pch_nx(gimple_statement_base*, void (*)(void*, void*), void*)') Function added: Function('gt_pch_p_21gimple_statement_base(void*, void*, void (*)(void*, void*), void*)') Function added: Function('gt_ggc_mx_gimple_statement_base(void*)') Function added: Function('gt_pch_nx_gimple_statement_base(void*)') Function hash_table<oecount_hasher, xcallocator>::find_slot_with_hash(void const*, unsigned int, insert_option) changed size from 5984 to 5872 bytes Function same_succ_def::equal(same_succ_def const*, same_succ_def const*) changed size from 480 to 512 bytes Function maybe_remove_unreachable_handlers() changed size from 112 to 128 bytes Function verify_ssa_operands(gimple_statement_d*) changed size from 927 to 960 bytes (renamed to verify_ssa_operands(gimple_statement_base*)) Function vect_analyze_data_ref_accesses(_loop_vec_info*, _bb_vec_info*) changed size from 3920 to 3872 bytes Function make_pass_ipa_pta(gcc::context*) changed size from 36880 to 16464 bytes Function inline_merge_summary(cgraph_edge*) changed size from 17904 to 17920 bytes Function release_defs_bitset(bitmap_head_def*) changed size from 2464 to 2304 bytes Function gt_pch_nx(loop*&) changed size from 144 to 32 bytes Function make_pass_fold_builtins(gcc::context*) changed size from 5711 to 5727 bytes Function dump_value_range(_IO_FILE*, value_range_d*) changed size from 32880 to 32800 bytes Function extract_true_false_edges_from_block(basic_block_def*, edge_def**, edge_def**) changed size from 20208 to 20224 bytes Function tree_ssa_lim() changed size from 4847 to 4831 bytes Function gt_ggc_mx_control_flow_graph(void*) changed size from 96 to 192 bytes Function vectorize_loops() changed size from 3999 to 4191 bytes Function dump_node(tree_node const*, int, _IO_FILE*) changed size from 10784 to 10928 bytes Function stmt_can_throw_external(gimple_statement_d*) changed size from 6399 to 6431 bytes (renamed to stmt_can_throw_external(gimple_statement_base*)) Function remove_phi_args(edge_def*) changed size from 272 to 288 bytes Function degenerate_phi_result(gimple_statement_d*) changed size from 6608 to 6592 bytes (renamed to degenerate_phi_result(gimple_statement_base*)) Function make_pass_fre(gcc::context*) changed size from 32815 to 33055 bytes Function make_pass_strlen(gcc::context*) changed size from 16815 to 16207 bytes Function build_type_cast(tree_node*, gimple_statement_d*, ssa_mode) changed size from 1376 to 47 bytes (renamed to build_type_cast(tree_node*, gimple_statement_base*, ssa_mode)) Function replace_uses_by(tree_node*, tree_node*) changed size from 5600 to 5632 bytes Function update_stmt_operands(gimple_statement_d*) changed size from 3968 to 4000 bytes (renamed to update_stmt_operands(gimple_statement_base*)) Function gimplify_and_update_call_from_tree(gimple_stmt_iterator_d*, tree_node*) changed size from 1232 to 1200 bytes Function hash_table<expr_elt_hasher, xcallocator>::find_slot_with_hash(expr_hash_elt const*, unsigned int, insert_option) changed size from 7392 to 7359 bytes Function split_constant_offset(tree_node*, tree_node**, tree_node**) changed size from 1440 to 1392 bytes Function hash_table<iv_inv_expr_hasher, xcallocator>::find_slot_with_hash(iv_inv_expr_ent const*, unsigned int, insert_option) changed size from 1328 to 1312 bytes Function dump_dfa_stats(_IO_FILE*) changed size from 1791 to 1824 bytes Function copy_decl_no_change(tree_node*, copy_body_data*) changed size from 4384 to 4352 bytes Function _start changed size from 956 to 948 bytes Function vn_nary_op_insert_stmt(gimple_statement_d*, tree_node*) changed size from 8896 to 9824 bytes (renamed to vn_nary_op_insert_stmt(gimple_statement_base*, tree_node*)) Function vect_finish_stmt_generation(gimple_statement_d*, gimple_statement_d*, gimple_stmt_iterator_d*) changed size from 1184 to 1200 bytes (renamed to vect_finish_stmt_generation(gimple_statement_base*, gimple_statement_base*, gimple_stmt_iterator_d*)) Function hash_table<ssa_names_hasher, xcallocator>::find_slot_with_hash(name_to_bb const*, unsigned int, insert_option) changed size from 7248 to 7216 bytes Function loop_niter_by_eval(loop*, edge_def*) changed size from 848 to 864 bytes Function move_ssa_defining_stmt_for_defs(gimple_statement_d*, gimple_statement_d*) changed size from 848 to 832 bytes (renamed to move_ssa_defining_stmt_for_defs(gimple_statement_base*, gimple_statement_base*)) Function update_call_from_tree(gimple_stmt_iterator_d*, tree_node*) changed size from 943 to 928 bytes Function reset_debug_uses(gimple_statement_d*) changed size from 2352 to 2304 bytes (renamed to reset_debug_uses(gimple_statement_base*)) Function void va_stack::reserve<adjust_info>(vec<adjust_info, va_stack, vl_embed>*&, unsigned int, bool) changed size from 17296 to 17088 bytes Function hash_table<simduid_to_vf, xcallocator>::expand() changed size from 50672 to 51088 bytes Function gimple_stmt_may_fallthru(gimple_statement_d*) changed size from 287 to 272 bytes (renamed to gimple_stmt_may_fallthru(gimple_statement_base*)) Function gimple_call_copy_skip_args(gimple_statement_d*, bitmap_head_def*) changed size from 672 to 688 bytes (renamed to gimple_call_copy_skip_args(gimple_statement_base*, bitmap_head_def*)) Function make_pass_diagnose_omp_blocks(gcc::context*) changed size from 14128 to 14144 bytes Function mark_virtual_phi_result_for_renaming(gimple_statement_d*) changed size from 8800 to 8736 bytes (renamed to mark_virtual_phi_result_for_renaming(gimple_statement_base*)) Function make_pass_early_ipa_sra(gcc::context*) changed size from 21151 to 21167 bytes Function vect_pattern_recog(_loop_vec_info*, _bb_vec_info*) changed size from 10095 to 10112 bytes Function input_bb(lto_input_block*, LTO_tags, data_in*, function*, int) changed size from 2912 to 2975 bytes Function gimple_find_values_to_profile(vec<histogram_value_t*, va_heap, vl_ptr>*) changed size from 15888 to 15856 bytes Function walk_gimple_op(gimple_statement_d*, tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) changed size from 2064 to 2000 bytes (renamed to walk_gimple_op(gimple_statement_base*, tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*)) Function make_pass_ch(gcc::context*) changed size from 22672 to 22704 bytes Function vect_can_advance_ivs_p(_loop_vec_info*) changed size from 6880 to 7472 bytes Function lto_end_uncompression(lto_compression_stream*) changed size from 31600 to 31536 bytes Function gimple_copy(gimple_statement_d*) changed size from 928 to 895 bytes (renamed to gimple_copy(gimple_statement_base*)) Function coalesce_ssa_name() changed size from 8911 to 8895 bytes Function fixup_noreturn_call(gimple_statement_d*) changed size from 2544 to 2560 bytes (renamed to fixup_noreturn_call(gimple_statement_base*)) Function make_pass_strength_reduction(gcc::context*) changed size from 8239 to 8223 bytes Function hash_table<vn_phi_hasher, xcallocator>::find_slot_with_hash(vn_phi_s const*, unsigned int, insert_option) changed size from 5904 to 5728 bytes Function copy_reference_ops_from_call(gimple_statement_d*, vec<vn_reference_op_struct, va_heap, vl_ptr>*) changed size from 911 to 928 bytes (renamed to copy_reference_ops_from_call(gimple_statement_base*, vec<vn_reference_op_struct, va_heap, vl_ptr>*)) Function vec<data_dependence_relation*, va_heap, vl_ptr>::reserve(unsigned int, bool) changed size from 3664 to 3648 bytes Function hash_table<mem_ref_hasher, xcallocator>::find_slot_with_hash(tree_node const*, unsigned int, insert_option) changed size from 2848 to 2832 bytes Function vec<vec<tree_node*, va_heap, vl_ptr>, va_heap, vl_ptr>::reserve(unsigned int, bool) changed size from 3216 to 3200 bytes Function execute_update_addresses_taken() changed size from 2784 to 2768 bytes Function vectorizable_condition(gimple_statement_d*, gimple_stmt_iterator_d*, gimple_statement_d**, tree_node*, int, _slp_tree*) changed size from 17648 to 17696 bytes (renamed to vectorizable_condition(gimple_statement_base*, gimple_stmt_iterator_d*, gimple_statement_base**, tree_node*, int, _slp_tree*)) Function supportable_narrowing_operation(tree_code, tree_node*, tree_node*, tree_code*, int*, vec<tree_node*, va_heap, vl_ptr>*) changed size from 19984 to 19968 bytes Function vect_record_grouped_load_vectors(gimple_statement_d*, vec<tree_node*, va_heap, vl_ptr>) changed size from 384 to 400 bytes (renamed to vect_record_grouped_load_vectors(gimple_statement_base*, vec<tree_node*, va_heap, vl_ptr>)) Function vect_enhance_data_refs_alignment(_loop_vec_info*) changed size from 5328 to 5312 bytes Function expr_last(tree_node*) changed size from 16848 to 16816 bytes Function make_pass_dse(gcc::context*) changed size from 39600 to 39424 bytes Function stmt_could_throw_p(gimple_statement_d*) changed size from 768 to 752 bytes (renamed to stmt_could_throw_p(gimple_statement_base*)) Function void va_stack::release<tree_node*>(vec<tree_node*, va_stack, vl_embed>*&) changed size from 22096 to 22192 bytes Function substitute_and_fold(tree_node* (*)(tree_node*), bool (*)(gimple_stmt_iterator_d*), bool) changed size from 3728 to 3696 bytes Function void va_gc::reserve<gimple_statement_d*, va_gc>(vec<gimple_statement_d*, va_gc, vl_embed>*&, unsigned int, bool) changed size from 27552 to 27808 bytes (renamed to void va_gc::reserve<gimple_statement_base*, va_gc>(vec<gimple_statement_base*, va_gc, vl_embed>*&, unsigned int, bool)) Function blocks_in_phiopt_order() changed size from 11568 to 11536 bytes Function debug_currdefs() changed size from 11408 to 11456 bytes Function make_pass_ipa_lower_emutls(gcc::context*) changed size from 11888 to 11920 bytes Function vn_nary_op_insert(tree_node*, tree_node*) changed size from 2128 to 2144 bytes Function make_pass_phiprop(gcc::context*) changed size from 13184 to 13168 bytes Function voidify_wrapper_expr(tree_node*, tree_node*) changed size from 3408 to 1376 bytes Function canonicalize_loop_ivs(loop*, tree_node**, bool) changed size from 1856 to 1904 bytes Function multiplier_allowed_in_address_p(long, machine_mode, unsigned char) changed size from 11296 to 11280 bytes Function gt_ggc_mx(loop*&) changed size from 128 to 32 bytes Function cgraph_redirect_edge_call_stmt_to_callee(cgraph_edge*) changed size from 1696 to 1664 bytes Function operation_could_trap_helper_p(tree_code, bool, bool, bool, bool, tree_node*, bool*) changed size from 208 to 224 bytes Function compute_may_aliases() changed size from 8624 to 8639 bytes Function make_pass_lower_vector_ssa(gcc::context*) changed size from 2768 to 2783 bytes Function dump_all_asserts(_IO_FILE*) changed size from 6640 to 6688 bytes Function find_replaceable_exprs(_var_map*) changed size from 5328 to 5263 bytes Function record_vars_into(tree_node*, tree_node*) changed size from 4320 to 4336 bytes Function make_pass_postreload_cse(gcc::context*) changed size from 9632 to 9616 bytes Function expr_invariant_in_loop_p(loop*, tree_node*) changed size from 3200 to 3232 bytes Function hash_table<stridxlist_hasher, xcallocator>::expand() changed size from 14784 to 35232 bytes Function make_pass_tree_loop_done(gcc::context*) changed size from 31904 to 31952 bytes Function omp_firstprivatize_variable(gimplify_omp_ctx*, tree_node*) changed size from 1023 to 3056 bytes Function make_pass_phi_only_cprop(gcc::context*) changed size from 12511 to 12495 bytes Function gimplify_self_mod_expr(tree_node**, gimple_statement_d**, gimple_statement_d**, bool, tree_node*) changed size from 19632 to 19600 bytes (renamed to gimplify_self_mod_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool, tree_node*)) Function make_pass_rename_ssa_copies(gcc::context*) changed size from 9840 to 9776 bytes Function update_ssa(unsigned int) changed size from 15328 to 15344 bytes Function gt_pch_nx_control_flow_graph(void*) changed size from 96 to 208 bytes Function hash_table<instantiate_cache_entry_hasher, xcallocator>::expand() changed size from 11664 to 11680 bytes Function build_duplicate_type(tree_node*) changed size from 11888 to 11872 bytes