From patchwork Tue Oct 9 08:17:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 981093 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-487186-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="XyN0gUIh"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Tr9G6yFCz9s9J for ; Tue, 9 Oct 2018 19:33:38 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=iQNS4Ki0kwi0HvnmJ luypxh4tc38txBZjySNWM8gvcXVVTpu+WwSpJCN9T9oPqVrV2xQnl78ic9JuskCl UXSjpRcOn92Grd4SLemmKGI+JqkbArPalswqh+p9R9JvpQ0zXRLRQt2yCHX+uj31 qVrC1H3oWuq6Wrs1NY2bp+I/dY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=KDik8CrzPau4FkXhCD8eIGX 264w=; b=XyN0gUIhgyIaazpjEstOq2247Y0ZXYKWbqZard6WcUajY6sOgwN1chB TmySfAHOSh4Dzguf0fKwXYkEYbeGwayPdTbCc8JmhydCcg98WrsWTBnJTqbHj/a+ +jEXPNFW8XUd8Y8Ph6aOxhQu4M2e4z2I01rWVQma5PUExL0jzbL0= Received: (qmail 21085 invoked by alias); 9 Oct 2018 08:24:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 124487 invoked by uid 89); 9 Oct 2018 08:17:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=ham version=3.3.2 spammy=STATE, worker, WARNED, finds X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Oct 2018 08:17:23 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3D1B5AD68; Tue, 9 Oct 2018 08:17:21 +0000 (UTC) Subject: [PATCH] Remove dead functions and fix VMS target by moving back some functions. From: =?utf-8?q?Martin_Li=C5=A1ka?= To: Bernhard Reutner-Fischer , Jeff Law Cc: Richard Guenther , GCC Patches References: <192f112275eb2c7bc74fdd3b91c0b32882695d22.1537774329.git.mliska@suse.cz> <43d7b949-b909-6c5a-866a-d7a8f56e26b2@redhat.com> <5386add0-0af1-d604-96e6-dab0e565924b@suse.cz> <139d57c2-c70b-3852-0e20-8d19e6ae6bce@suse.cz> <20180927131337.1104d328@nbbrfq.loc> <3cc447f0-5cf3-3c0b-4293-f64059605871@suse.cz> Message-ID: <794c78c4-0950-420c-2fd4-21b5e17d881f@suse.cz> Date: Tue, 9 Oct 2018 10:17:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <3cc447f0-5cf3-3c0b-4293-f64059605871@suse.cz> X-IsSubscribed: yes Hi. Utilizing rtags' --find-dead-functions I'm suggesting a removal of part of the functions reported with the script. I built all cross compilers defined in contrib/config-list.mk and I fixed VMS targets that I broke in previous removal. If the folks are happy with the removal, I can probably continue with that at some point in stage3 or so. Ready for trunk? Thanks, Martin From f69d866da42a46783ab57181692583d2ecf30c49 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 5 Oct 2018 16:59:07 +0200 Subject: [PATCH] Remove dead functions and fix VMS target by moving back some functions. gcc/ChangeLog: 2018-10-09 Martin Liska * attribs.c (register_attribute): Remove unused functions. * cfganal.c (control_dependences::clear_control_dependence_bitmap): Likewise. (bitmap_union_of_succs): Likewise. * cfganal.h (bitmap_union_of_succs): Likewise. * cfgloop.c (loop_exits_to_bb_p): Likewise. * cfgloop.h (loop_exits_to_bb_p): Likewise. * cgraph.h (compute_call_stmt_bb_frequency): Likewise. * cgraphbuild.c (compute_call_stmt_bb_frequency): Likewise. * cselib.c (cselib_dummy_expand_value_rtx_cb): Likewise. * cselib.h (cselib_dummy_expand_value_rtx_cb): Likewise. * df-core.c (df_reg_defined): Likewise. (df_reg_used): Likewise. * df-scan.c (df_hard_reg_used_count): Likewise. * df.h (df_reg_defined): Likewise. (df_reg_used): Likewise. (df_hard_reg_used_count): Likewise. * dojump.c (init_pending_stack_adjust): Likewise. * dojump.h (init_pending_stack_adjust): Likewise. * dwarf2out.c (add_AT_vms_delta): Move function back after removal. (dwarf2out_set_demangle_name_func): REmove unused functions. * dwarf2out.h (dwarf2out_set_demangle_name_func): Likewise. * emit-rtl.c (emit_jump_insn_before_noloc): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_barrier_before): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_call_insn_after_setloc): Likewise. (emit_jump_insn_before_setloc): Likewise. (emit_call_insn_before_setloc): Likewise. (emit_call_insn_before): Likewise. * except.c (remove_eh_handler): Likewise. (get_eh_region_from_rtx): Likewise. * except.h (remove_eh_handler): Likewise. (get_eh_region_from_rtx): Likewise. * fold-const.c (div_if_zero_remainder): Likewise. (fold_unary_to_constant): Likewise. * fold-const.h (fold_unary_to_constant): Likewise. (div_if_zero_remainder): Likewise. * function.c (get_hard_reg_initial_reg): Likewise. (get_last_funcdef_no): Likewise. * function.h (get_hard_reg_initial_reg): Likewise. (get_last_funcdef_no): Likewise. * ggc-common.c (ggc_cleared_alloc_htab_ignore_args): Likewise. (ggc_cleared_alloc_ptr_array_two_args): Likewise. (ggc_splay_alloc): Likewise. (ggc_splay_dont_free): Likewise. * gimple-expr.c (is_gimple_address): Likewise. * gimple-expr.h (is_gimple_address): Likewise. * gimple-iterator.c (gsi_for_phi): Likewise. * gimple-iterator.h (gsi_for_phi): Likewise. * gimple-ssa-sprintf.c (struct format_result): Likewise. (format_result::operator+=): Likewise. (struct directive): Likewise. * gimple-ssa-warn-alloca.c (struct alloca_type_and_limit): Likewise. * gimple.c (gimple_unsigned_type): Likewise. (gimple_call_builtin_p): Likewise. * gimple.h (gimple_unsigned_type): Likewise. (gimple_call_builtin_p): Likewise. * gimplify.c (gimple_current_bind_expr): Likewise. * gimplify.h (gimple_current_bind_expr): Likewise. * haifa-sched.c (haifa_classify_insn): Likewise. * hsa-common.c (hsa_add_kernel_dependency): Likewise. (hsa_brig_function_name): Likewise. * hsa-common.h (hsa_add_kernel_dependency): Likewise. (hsa_brig_function_name): Likewise. * ipa-cp.c (ipcp_vr_lattice::meet_with): Likewise. * ipa-devirt.c (vtable_pointer_value_to_binfo): Likewise. * ipa-icf-gimple.c (func_checker::compare_tree_ssa_label): Likewise. * ipa-icf-gimple.h: Likewise. * ipa-icf.c (sem_item::sem_item): Likewise. (sem_function::sem_function): Likewise. (sem_function::icf_handled_component_p): Likewise. (sem_variable::sem_variable): Likewise. * ipa-icf.h: Likewise. * ipa-param-manipulation.c (index_in_adjustments_multiple_times_p): Likewise. (ipa_combine_adjustments): Likewise. * ipa-param-manipulation.h (ipa_combine_adjustments): Likewise. * ipa-prop.h (ipa_create_all_node_params): Likewise. (ipa_create_all_edge_args): Likewise. * ipa-ref.h: Likewise. * ipa-utils.h (vtable_pointer_value_to_binfo): Likewise. * lto-section-in.c (lto_delete_in_decl_state): Likewise. * lto-streamer-in.c (lto_input_data_block): Likewise. * lto-streamer.c (gate_lto_out): Likewise. * lto-streamer.h (lto_delete_in_decl_state): Likewise. (gate_lto_out): Likewise. (lto_input_data_block): Likewise. * predict.c (edge_probability_reliable_p): Likewise. * predict.h (edge_probability_reliable_p): Likewise. * read-md.c (md_reader::read_name_or_nil): Likewise. * read-md.h (class md_reader): Likewise. * rtl.h (get_first_nonnote_insn): Likewise. (emit_jump_insn_before_noloc): Likewise. (emit_jump_insn_before_setloc): Likewise. (emit_call_insn_before): Likewise. (emit_call_insn_before_noloc): Likewise. (emit_call_insn_before_setloc): Likewise. (emit_barrier_before): Likewise. (emit_call_insn_after_noloc): Likewise. (emit_call_insn_after_setloc): Likewise. * toplev.h: Likewise. * tree-inline.h: Likewise. gcc/c-family/ChangeLog: 2018-10-09 Martin Liska * c-common.h (constant_expression_error): Remove unused functions. * c-pretty-print.c (pp_c_exclamation): Likewise. (pp_c_attributes): Likewise. (pp_c_function_definition): Likewise. * c-pretty-print.h (pp_c_exclamation): Likewise. (pp_c_function_definition): Likewise. (pp_c_attributes): Likewise. * c-warn.c (constant_expression_error): Likewise. --- gcc/attribs.c | 8 --- gcc/c-family/c-common.h | 1 - gcc/c-family/c-pretty-print.c | 45 --------------- gcc/c-family/c-pretty-print.h | 3 - gcc/c-family/c-warn.c | 13 ----- gcc/cfganal.c | 46 --------------- gcc/cfganal.h | 2 - gcc/cfgloop.c | 15 ----- gcc/cfgloop.h | 1 - gcc/cgraph.h | 1 - gcc/cgraphbuild.c | 9 --- gcc/cselib.c | 18 ------ gcc/cselib.h | 2 - gcc/df-core.c | 19 ------ gcc/df-scan.c | 14 ----- gcc/df.h | 3 - gcc/dojump.c | 9 --- gcc/dojump.h | 4 -- gcc/dwarf2out.c | 24 ++++++-- gcc/dwarf2out.h | 1 - gcc/emit-rtl.c | 77 ------------------------ gcc/except.c | 36 ------------ gcc/except.h | 2 - gcc/fold-const.c | 31 ---------- gcc/fold-const.h | 2 - gcc/function.c | 26 --------- gcc/function.h | 2 - gcc/ggc-common.c | 31 ---------- gcc/gimple-expr.c | 41 ------------- gcc/gimple-expr.h | 1 - gcc/gimple-iterator.c | 14 ----- gcc/gimple-iterator.h | 1 - gcc/gimple-ssa-sprintf.c | 45 --------------- gcc/gimple-ssa-warn-alloca.c | 1 - gcc/gimple.c | 22 ------- gcc/gimple.h | 2 - gcc/gimplify.c | 8 --- gcc/gimplify.h | 1 - gcc/haifa-sched.c | 2 +- gcc/hsa-common.c | 37 ------------ gcc/hsa-common.h | 2 - gcc/ipa-cp.c | 7 --- gcc/ipa-devirt.c | 21 ------- gcc/ipa-icf-gimple.c | 8 --- gcc/ipa-icf-gimple.h | 7 --- gcc/ipa-icf.c | 30 ---------- gcc/ipa-icf.h | 17 ------ gcc/ipa-param-manipulation.c | 106 ---------------------------------- gcc/ipa-param-manipulation.h | 2 - gcc/ipa-prop.h | 2 - gcc/ipa-ref.h | 14 ----- gcc/ipa-utils.h | 1 - gcc/lto-section-in.c | 12 ---- gcc/lto-streamer-in.c | 13 ----- gcc/lto-streamer.c | 10 ---- gcc/lto-streamer.h | 3 - gcc/predict.c | 7 --- gcc/predict.h | 1 - gcc/read-md.c | 16 ----- gcc/read-md.h | 1 - gcc/rtl.h | 10 ---- gcc/toplev.h | 5 -- gcc/tree-inline.h | 4 -- 63 files changed, 19 insertions(+), 900 deletions(-) diff --git a/gcc/attribs.c b/gcc/attribs.c index 8b721274d3b..a74b30bb7a2 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -253,14 +253,6 @@ init_attributes (void) attributes_initialized = true; } -/* Insert a single ATTR into the attribute table. */ - -void -register_attribute (const struct attribute_spec *attr) -{ - register_scoped_attribute (attr, find_attribute_namespace ("gnu")); -} - /* Insert a single attribute ATTR into a namespace of attributes. */ static void diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 9e868768d01..c9b26cac8af 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -1254,7 +1254,6 @@ extern bool valid_array_size_p (location_t, tree, tree, bool = true); /* In c-warn.c. */ extern void constant_expression_warning (tree); -extern void constant_expression_error (tree); extern void overflow_warning (location_t, tree, tree = NULL_TREE); extern void warn_logical_operator (location_t, enum tree_code, tree, enum tree_code, tree, enum tree_code, tree); diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c index efb41c5b905..cc2933a33b1 100644 --- a/gcc/c-family/c-pretty-print.c +++ b/gcc/c-family/c-pretty-print.c @@ -156,13 +156,6 @@ pp_c_complement (c_pretty_printer *pp) pp->padding = pp_none; } -void -pp_c_exclamation (c_pretty_printer *pp) -{ - pp_exclamation (pp); - pp->padding = pp_none; -} - /* Print out the external representation of QUALIFIERS. */ void @@ -765,30 +758,6 @@ c_pretty_printer::declaration (tree t) pp_c_init_declarator (this, t); } -/* Pretty-print ATTRIBUTES using GNU C extension syntax. */ - -void -pp_c_attributes (c_pretty_printer *pp, tree attributes) -{ - if (attributes == NULL_TREE) - return; - - pp_c_ws_string (pp, "__attribute__"); - pp_c_left_paren (pp); - pp_c_left_paren (pp); - for (; attributes != NULL_TREE; attributes = TREE_CHAIN (attributes)) - { - pp_tree_identifier (pp, TREE_PURPOSE (attributes)); - if (TREE_VALUE (attributes)) - pp_c_call_argument_list (pp, TREE_VALUE (attributes)); - - if (TREE_CHAIN (attributes)) - pp_separate_with (pp, ','); - } - pp_c_right_paren (pp); - pp_c_right_paren (pp); -} - /* Pretty-print ATTRIBUTES using GNU C extension syntax for attributes marked to be displayed on disgnostic. */ @@ -833,20 +802,6 @@ pp_c_attributes_display (c_pretty_printer *pp, tree a) pp_c_whitespace (pp); } } - -/* function-definition: - declaration-specifiers declarator compound-statement */ - -void -pp_c_function_definition (c_pretty_printer *pp, tree t) -{ - pp->declaration_specifiers (t); - pp->declarator (t); - pp_needs_newline (pp) = true; - pp->statement (DECL_SAVED_TREE (t)); - pp_newline_and_flush (pp); -} - /* Expressions. */ diff --git a/gcc/c-family/c-pretty-print.h b/gcc/c-family/c-pretty-print.h index c012b8cbe38..d7eb93025e9 100644 --- a/gcc/c-family/c-pretty-print.h +++ b/gcc/c-family/c-pretty-print.h @@ -111,13 +111,10 @@ void pp_c_star (c_pretty_printer *); void pp_c_arrow (c_pretty_printer *); void pp_c_semicolon (c_pretty_printer *); void pp_c_complement (c_pretty_printer *); -void pp_c_exclamation (c_pretty_printer *); void pp_c_space_for_pointer_operator (c_pretty_printer *, tree); /* Declarations. */ void pp_c_tree_decl_identifier (c_pretty_printer *, tree); -void pp_c_function_definition (c_pretty_printer *, tree); -void pp_c_attributes (c_pretty_printer *, tree); void pp_c_attributes_display (c_pretty_printer *, tree); void pp_c_cv_qualifiers (c_pretty_printer *pp, int qualifiers, bool func_type); void pp_c_type_qualifier_list (c_pretty_printer *, tree); diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index a1a7f935964..44e3be20fcb 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -54,19 +54,6 @@ constant_expression_warning (tree value) pedwarn (input_location, OPT_Woverflow, "overflow in constant expression"); } -/* The same as above but print an unconditional error. */ - -void -constant_expression_error (tree value) -{ - if ((TREE_CODE (value) == INTEGER_CST || TREE_CODE (value) == REAL_CST - || TREE_CODE (value) == FIXED_CST - || TREE_CODE (value) == VECTOR_CST - || TREE_CODE (value) == COMPLEX_CST) - && TREE_OVERFLOW (value)) - error ("overflow in constant expression"); -} - /* Print a warning if an expression result VALUE had an overflow in folding and its operands hadn't. EXPR, which may be null, is the operand of the expression. diff --git a/gcc/cfganal.c b/gcc/cfganal.c index 3b80758e8f2..dfa8bf7f8e2 100644 --- a/gcc/cfganal.c +++ b/gcc/cfganal.c @@ -365,13 +365,6 @@ control_dependences::set_control_dependence_map_bit (basic_block bb, bitmap_set_bit (control_dependence_map[bb->index], edge_index); } -/* Clear all control dependences for block BB. */ -void -control_dependences::clear_control_dependence_bitmap (basic_block bb) -{ - bitmap_clear (control_dependence_map[bb->index]); -} - /* Find the immediate postdominator PDOM of the specified basic block BLOCK. This function is necessary because some blocks have negative numbers. */ @@ -1509,45 +1502,6 @@ bitmap_intersection_of_preds (sbitmap dst, sbitmap *src, basic_block b) } } -/* Set the bitmap DST to the union of SRC of successors of - basic block B. */ - -void -bitmap_union_of_succs (sbitmap dst, sbitmap *src, basic_block b) -{ - unsigned int set_size = dst->size; - edge e; - unsigned ix; - - for (ix = 0; ix < EDGE_COUNT (b->succs); ix++) - { - e = EDGE_SUCC (b, ix); - if (e->dest == EXIT_BLOCK_PTR_FOR_FN (cfun)) - continue; - - bitmap_copy (dst, src[e->dest->index]); - break; - } - - if (ix == EDGE_COUNT (b->succs)) - bitmap_clear (dst); - else - for (ix++; ix < EDGE_COUNT (b->succs); ix++) - { - unsigned int i; - SBITMAP_ELT_TYPE *p, *r; - - e = EDGE_SUCC (b, ix); - if (e->dest == EXIT_BLOCK_PTR_FOR_FN (cfun)) - continue; - - p = src[e->dest->index]->elms; - r = dst->elms; - for (i = 0; i < set_size; i++) - *r++ |= *p++; - } -} - /* Set the bitmap DST to the union of SRC of predecessors of basic block B. */ diff --git a/gcc/cfganal.h b/gcc/cfganal.h index 122c665f7f6..e2512861e47 100644 --- a/gcc/cfganal.h +++ b/gcc/cfganal.h @@ -42,7 +42,6 @@ public: private: void set_control_dependence_map_bit (basic_block, int); - void clear_control_dependence_bitmap (basic_block); void find_control_dependence (int); vec control_dependence_map; vec > m_el; @@ -76,7 +75,6 @@ extern void compute_dominance_frontiers (struct bitmap_head *); extern bitmap compute_idf (bitmap, struct bitmap_head *); extern void bitmap_intersection_of_succs (sbitmap, sbitmap *, basic_block); extern void bitmap_intersection_of_preds (sbitmap, sbitmap *, basic_block); -extern void bitmap_union_of_succs (sbitmap, sbitmap *, basic_block); extern void bitmap_union_of_preds (sbitmap, sbitmap *, basic_block); extern basic_block * single_pred_before_succ_order (void); extern edge single_incoming_edge_ignoring_loop_edges (basic_block, bool); diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 0917b716da7..2d43a3d694c 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -1769,21 +1769,6 @@ single_exit (const struct loop *loop) return NULL; } -/* Returns true when BB has an incoming edge exiting LOOP. */ - -bool -loop_exits_to_bb_p (struct loop *loop, basic_block bb) -{ - edge e; - edge_iterator ei; - - FOR_EACH_EDGE (e, ei, bb->preds) - if (loop_exit_edge_p (loop, e)) - return true; - - return false; -} - /* Returns true when BB has an outgoing edge exiting LOOP. */ bool diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 80a31c416ca..750939451dd 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -354,7 +354,6 @@ extern int num_loop_insns (const struct loop *); extern int average_num_loop_insns (const struct loop *); extern unsigned get_loop_level (const struct loop *); extern bool loop_exit_edge_p (const struct loop *, const_edge); -extern bool loop_exits_to_bb_p (struct loop *, basic_block); extern bool loop_exits_from_bb_p (struct loop *, basic_block); extern void mark_loop_exit_edges (void); extern dump_user_location_t get_loop_location (struct loop *loop); diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 71c54537b93..c30ba3cdb7e 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -2395,7 +2395,6 @@ tree cgraph_build_function_type_skip_args (tree orig_type, bitmap args_to_skip, bool skip_return); /* In cgraphbuild.c */ -int compute_call_stmt_bb_frequency (tree, basic_block bb); void record_references_in_initializer (tree, bool); /* In ipa.c */ diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index c2ad5cf2ef7..f1308dfdb5b 100644 --- a/gcc/cgraphbuild.c +++ b/gcc/cgraphbuild.c @@ -185,15 +185,6 @@ record_eh_tables (cgraph_node *node, function *fun) } } -/* Computes the frequency of the call statement so that it can be stored in - cgraph_edge. BB is the basic block of the call statement. */ -int -compute_call_stmt_bb_frequency (tree decl, basic_block bb) -{ - return bb->count.to_cgraph_frequency - (ENTRY_BLOCK_PTR_FOR_FN (DECL_STRUCT_FUNCTION (decl))->count); -} - /* Mark address taken in STMT. */ static bool diff --git a/gcc/cselib.c b/gcc/cselib.c index 6d3a4078c68..f667c4e7503 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -1562,24 +1562,6 @@ cselib_expand_value_rtx_cb (rtx orig, bitmap regs_active, int max_depth, return cselib_expand_value_rtx_1 (orig, &evd, max_depth); } -/* Similar to cselib_expand_value_rtx_cb, but no rtxs are actually copied - or simplified. Useful to find out whether cselib_expand_value_rtx_cb - would return NULL or non-NULL, without allocating new rtx. */ - -bool -cselib_dummy_expand_value_rtx_cb (rtx orig, bitmap regs_active, int max_depth, - cselib_expand_callback cb, void *data) -{ - struct expand_value_data evd; - - evd.regs_active = regs_active; - evd.callback = cb; - evd.callback_arg = data; - evd.dummy = true; - - return cselib_expand_value_rtx_1 (orig, &evd, max_depth) != NULL; -} - /* Internal implementation of cselib_expand_value_rtx and cselib_expand_value_rtx_cb. */ diff --git a/gcc/cselib.h b/gcc/cselib.h index 0005ad3113c..8fdbcfc6d5f 100644 --- a/gcc/cselib.h +++ b/gcc/cselib.h @@ -88,8 +88,6 @@ extern rtx cselib_expand_value_rtx (rtx, bitmap, int); typedef rtx (*cselib_expand_callback)(rtx, bitmap, int, void *); extern rtx cselib_expand_value_rtx_cb (rtx, bitmap, int, cselib_expand_callback, void *); -extern bool cselib_dummy_expand_value_rtx_cb (rtx, bitmap, int, - cselib_expand_callback, void *); extern rtx cselib_subst_to_values (rtx, machine_mode); extern rtx cselib_subst_to_values_from_insn (rtx, machine_mode, rtx_insn *); extern void cselib_invalidate_rtx (rtx, const_rtx = NULL); diff --git a/gcc/df-core.c b/gcc/df-core.c index 74ef0a14ac9..59949576f16 100644 --- a/gcc/df-core.c +++ b/gcc/df-core.c @@ -1967,15 +1967,6 @@ df_find_def (rtx_insn *insn, rtx reg) } -/* Return true if REG is defined in INSN, zero otherwise. */ - -bool -df_reg_defined (rtx_insn *insn, rtx reg) -{ - return df_find_def (insn, reg) != NULL; -} - - /* Finds the reference corresponding to the use of REG in INSN. DF is the dataflow object. */ @@ -1998,16 +1989,6 @@ df_find_use (rtx_insn *insn, rtx reg) return use; return NULL; } - - -/* Return true if REG is referenced in INSN, zero otherwise. */ - -bool -df_reg_used (rtx_insn *insn, rtx reg) -{ - return df_find_use (insn, reg) != NULL; -} - /*---------------------------------------------------------------------------- Debugging and printing functions. diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 0b119f211ea..a891b49d78a 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -3868,20 +3868,6 @@ df_hard_reg_used_p (unsigned int reg) } -/* A count of the number of times REG is actually used in the some - instruction. There are a fair number of conditions that affect the - setting of this array. See the comment in df.h for - df->hard_regs_live_count for the conditions that this array is - set. */ - - -unsigned int -df_hard_reg_used_count (unsigned int reg) -{ - return df->hard_regs_live_count[reg]; -} - - /* Get the value of regs_ever_live[REGNO]. */ bool diff --git a/gcc/df.h b/gcc/df.h index 6d1ff4d68ca..35a24eb7063 100644 --- a/gcc/df.h +++ b/gcc/df.h @@ -980,9 +980,7 @@ extern void df_check_cfg_clean (void); extern df_ref df_bb_regno_first_def_find (basic_block, unsigned int); extern df_ref df_bb_regno_last_def_find (basic_block, unsigned int); extern df_ref df_find_def (rtx_insn *, rtx); -extern bool df_reg_defined (rtx_insn *, rtx); extern df_ref df_find_use (rtx_insn *, rtx); -extern bool df_reg_used (rtx_insn *, rtx); extern void df_worklist_dataflow (struct dataflow *,bitmap, int *, int); extern void df_print_regset (FILE *file, bitmap r); extern void df_print_word_regset (FILE *file, bitmap r); @@ -1076,7 +1074,6 @@ extern void df_update_entry_block_defs (void); extern void df_update_exit_block_uses (void); extern void df_update_entry_exit_and_calls (void); extern bool df_hard_reg_used_p (unsigned int); -extern unsigned int df_hard_reg_used_count (unsigned int); extern bool df_regs_ever_live_p (unsigned int); extern void df_set_regs_ever_live (unsigned int, bool); extern void df_compute_regs_ever_live (bool); diff --git a/gcc/dojump.c b/gcc/dojump.c index 9dccc7292a3..88d97b077b2 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -50,15 +50,6 @@ static void do_compare_and_jump (tree, tree, enum rtx_code, enum rtx_code, rtx_code_label *, rtx_code_label *, profile_probability); -/* At the start of a function, record that we have no previously-pushed - arguments waiting to be popped. */ - -void -init_pending_stack_adjust (void) -{ - pending_stack_adjust = 0; -} - /* Discard any pending stack adjustment. This avoid relying on the RTL optimizers to remove useless adjustments when we know the stack pointer value is dead. */ diff --git a/gcc/dojump.h b/gcc/dojump.h index f948ee916e3..8a6412be0d6 100644 --- a/gcc/dojump.h +++ b/gcc/dojump.h @@ -20,10 +20,6 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_DOJUMP_H #define GCC_DOJUMP_H -/* At the start of a function, record that we have no previously-pushed - arguments waiting to be popped. */ -extern void init_pending_stack_adjust (void); - /* Discard any pending stack adjustment. */ extern void discard_pending_stack_adjust (void); diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 0772b364919..91f9dacec88 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3901,6 +3901,8 @@ static void prune_unused_types (void); static int maybe_emit_file (struct dwarf_file_data *fd); static inline const char *AT_vms_delta1 (dw_attr_node *); static inline const char *AT_vms_delta2 (dw_attr_node *); +static inline void add_AT_vms_delta (dw_die_ref, enum dwarf_attribute, + const char *, const char *); static void append_entry_to_tmpl_value_parm_die_table (dw_die_ref, tree); static void gen_remaining_tmpl_value_param_die_attribute (void); static bool generic_type_p (tree); @@ -4201,12 +4203,6 @@ comp_unit_die (void) static const char *(*demangle_name_func) (const char *); -void -dwarf2out_set_demangle_name_func (const char *(*func) (const char *)) -{ - demangle_name_func = func; -} - /* Test if rtl node points to a pseudo register. */ static inline int @@ -5135,6 +5131,22 @@ AT_file (dw_attr_node *a) return a->dw_attr_val.v.val_file; } +/* Add a vms delta attribute value to a DIE. */ + +static inline void +add_AT_vms_delta (dw_die_ref die, enum dwarf_attribute attr_kind, + const char *lbl1, const char *lbl2) +{ + dw_attr_node attr; + + attr.dw_attr = attr_kind; + attr.dw_attr_val.val_class = dw_val_class_vms_delta; + attr.dw_attr_val.val_entry = NULL; + attr.dw_attr_val.v.val_vms_delta.lbl1 = xstrdup (lbl1); + attr.dw_attr_val.v.val_vms_delta.lbl2 = xstrdup (lbl2); + add_dwarf_attr (die, &attr); +} + /* Add a symbolic view identifier attribute value to a DIE. */ static inline void diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h index a0ba414014d..e749d278708 100644 --- a/gcc/dwarf2out.h +++ b/gcc/dwarf2out.h @@ -312,7 +312,6 @@ extern void debug_dwarf_die (struct die_struct *); extern void debug_dwarf_loc_descr (dw_loc_descr_ref); extern void debug (die_struct &ref); extern void debug (die_struct *ptr); -extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *)); #ifdef VMS_DEBUGGING_INFO extern void dwarf2out_vms_debug_main_pointer (void); #endif diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 9a735fab5bf..0f98c96815f 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -4566,27 +4566,6 @@ emit_insn_before_noloc (rtx x, rtx_insn *before, basic_block bb) return emit_pattern_before_noloc (x, before, before, bb, make_insn_raw); } -/* Make an instruction with body X and code JUMP_INSN - and output it before the instruction BEFORE. */ - -rtx_jump_insn * -emit_jump_insn_before_noloc (rtx x, rtx_insn *before) -{ - return as_a ( - emit_pattern_before_noloc (x, before, NULL, NULL, - make_jump_insn_raw)); -} - -/* Make an instruction with body X and code CALL_INSN - and output it before the instruction BEFORE. */ - -rtx_insn * -emit_call_insn_before_noloc (rtx x, rtx_insn *before) -{ - return emit_pattern_before_noloc (x, before, NULL, NULL, - make_call_insn_raw); -} - /* Make an instruction with body X and code DEBUG_INSN and output it before the instruction BEFORE. */ @@ -4597,20 +4576,6 @@ emit_debug_insn_before_noloc (rtx x, rtx_insn *before) make_debug_insn_raw); } -/* Make an insn of code BARRIER - and output it before the insn BEFORE. */ - -rtx_barrier * -emit_barrier_before (rtx_insn *before) -{ - rtx_barrier *insn = as_a (rtx_alloc (BARRIER)); - - INSN_UID (insn) = cur_insn_uid++; - - add_insn_before (insn, before, NULL); - return insn; -} - /* Emit the label LABEL before the insn BEFORE. */ rtx_code_label * @@ -4726,15 +4691,6 @@ emit_jump_insn_after_noloc (rtx x, rtx_insn *after) emit_pattern_after_noloc (x, after, NULL, make_jump_insn_raw)); } -/* Make an instruction with body X and code CALL_INSN - and output it after the instruction AFTER. */ - -rtx_insn * -emit_call_insn_after_noloc (rtx x, rtx_insn *after) -{ - return emit_pattern_after_noloc (x, after, NULL, make_call_insn_raw); -} - /* Make an instruction with body X and code CALL_INSN and output it after the instruction AFTER. */ @@ -4909,13 +4865,6 @@ emit_jump_insn_after (rtx pattern, rtx_insn *after) emit_pattern_after (pattern, after, true, make_jump_insn_raw)); } -/* Like emit_call_insn_after_noloc, but set INSN_LOCATION according to LOC. */ -rtx_insn * -emit_call_insn_after_setloc (rtx pattern, rtx_insn *after, location_t loc) -{ - return emit_pattern_after_setloc (pattern, after, loc, make_call_insn_raw); -} - /* Like emit_call_insn_after_noloc, but set INSN_LOCATION according to AFTER. */ rtx_insn * emit_call_insn_after (rtx pattern, rtx_insn *after) @@ -5010,15 +4959,6 @@ emit_insn_before (rtx pattern, rtx_insn *before) return emit_pattern_before (pattern, before, true, true, make_insn_raw); } -/* like emit_insn_before_noloc, but set INSN_LOCATION according to LOC. */ -rtx_jump_insn * -emit_jump_insn_before_setloc (rtx pattern, rtx_insn *before, location_t loc) -{ - return as_a ( - emit_pattern_before_setloc (pattern, before, loc, false, - make_jump_insn_raw)); -} - /* Like emit_jump_insn_before_noloc, but set INSN_LOCATION according to BEFORE. */ rtx_jump_insn * emit_jump_insn_before (rtx pattern, rtx_insn *before) @@ -5028,23 +4968,6 @@ emit_jump_insn_before (rtx pattern, rtx_insn *before) make_jump_insn_raw)); } -/* Like emit_insn_before_noloc, but set INSN_LOCATION according to LOC. */ -rtx_insn * -emit_call_insn_before_setloc (rtx pattern, rtx_insn *before, location_t loc) -{ - return emit_pattern_before_setloc (pattern, before, loc, false, - make_call_insn_raw); -} - -/* Like emit_call_insn_before_noloc, - but set insn_location according to BEFORE. */ -rtx_insn * -emit_call_insn_before (rtx pattern, rtx_insn *before) -{ - return emit_pattern_before (pattern, before, true, false, - make_call_insn_raw); -} - /* Like emit_insn_before_noloc, but set INSN_LOCATION according to LOC. */ rtx_insn * emit_debug_insn_before_setloc (rtx pattern, rtx_insn *before, location_t loc) diff --git a/gcc/except.c b/gcc/except.c index 728b1e1d349..510f689a709 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1599,29 +1599,6 @@ remove_eh_handler_splicer (eh_region *pp) (*cfun->eh->region_array)[region->index] = NULL; } -/* Splice a single EH region REGION from the region tree. - - To unlink REGION, we need to find the pointer to it with a relatively - expensive search in REGION's outer region. If you are going to - remove a number of handlers, using remove_unreachable_eh_regions may - be a better option. */ - -void -remove_eh_handler (eh_region region) -{ - eh_region *pp, *pp_start, p, outer; - - outer = region->outer; - if (outer) - pp_start = &outer->inner; - else - pp_start = &cfun->eh->region_tree; - for (pp = pp_start, p = *pp; p != region; pp = &p->next_peer, p = *pp) - continue; - - remove_eh_handler_splicer (pp); -} - /* Worker for remove_unreachable_eh_regions. PP is a pointer to the region to start a region tree depth-first search from. R_REACHABLE is the set of regions that have to be @@ -1847,19 +1824,6 @@ get_eh_landing_pad_from_rtx (const_rtx insn) return lp; } -/* Return the region to which INSN may go, or NULL if it does not - have a reachable region within this function. */ - -eh_region -get_eh_region_from_rtx (const_rtx insn) -{ - eh_landing_pad lp; - eh_region r; - - get_eh_region_and_lp_from_rtx (insn, &r, &lp); - return r; -} - /* Return true if INSN throws and is caught by something in this function. */ bool diff --git a/gcc/except.h b/gcc/except.h index caa375ef670..a5476644bfb 100644 --- a/gcc/except.h +++ b/gcc/except.h @@ -225,7 +225,6 @@ extern void for_each_eh_label (void (*) (rtx)); extern void init_eh_for_function (void); extern void remove_eh_landing_pad (eh_landing_pad); -extern void remove_eh_handler (eh_region); extern void remove_unreachable_eh_regions (sbitmap); extern bool current_function_has_exception_handlers (void); @@ -278,7 +277,6 @@ extern void add_type_for_runtime (tree); extern tree lookup_type_for_runtime (tree); extern void assign_filter_values (void); -extern eh_region get_eh_region_from_rtx (const_rtx); extern eh_landing_pad get_eh_landing_pad_from_rtx (const_rtx); extern void finish_eh_generation (void); diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 59cedeafd71..7893152fdb5 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -169,22 +169,6 @@ protected_set_expr_location_unshare (tree x, location_t loc) return x; } -/* If ARG2 divides ARG1 with zero remainder, carries out the exact - division and returns the quotient. Otherwise returns - NULL_TREE. */ - -tree -div_if_zero_remainder (const_tree arg1, const_tree arg2) -{ - widest_int quo; - - if (wi::multiple_of_p (wi::to_widest (arg1), wi::to_widest (arg2), - SIGNED, &quo)) - return wide_int_to_tree (TREE_TYPE (arg1), quo); - - return NULL_TREE; -} - /* This is nonzero if we should defer warnings about undefined overflow. This facility exists because these warnings are a special case. The code to estimate loop iterations does not want @@ -13731,21 +13715,6 @@ fold_binary_to_constant (enum tree_code code, tree type, tree op0, tree op1) return (tem && TREE_CONSTANT (tem)) ? tem : NULL_TREE; } -/* Given the components of a unary expression CODE, TYPE and OP0, - attempt to fold the expression to a constant without modifying - TYPE or OP0. - - If the expression could be simplified to a constant, then return - the constant. If the expression would not be simplified to a - constant, then return NULL_TREE. */ - -tree -fold_unary_to_constant (enum tree_code code, tree type, tree op0) -{ - tree tem = fold_unary (code, type, op0); - return (tem && TREE_CONSTANT (tem)) ? tem : NULL_TREE; -} - /* If EXP represents referencing an element in a constant string (either via pointer arithmetic or array indexing), return the tree representing the value accessed, otherwise return NULL. */ diff --git a/gcc/fold-const.h b/gcc/fold-const.h index ca6d47bba34..bda12d814da 100644 --- a/gcc/fold-const.h +++ b/gcc/fold-const.h @@ -94,7 +94,6 @@ extern tree omit_two_operands_loc (location_t, tree, tree, tree, tree); #define invert_truthvalue(T)\ invert_truthvalue_loc (UNKNOWN_LOCATION, T) extern tree invert_truthvalue_loc (location_t, tree); -extern tree fold_unary_to_constant (enum tree_code, tree, tree); extern tree fold_binary_to_constant (enum tree_code, tree, tree, tree); extern tree fold_bit_and_mask (tree, tree, enum tree_code, tree, enum tree_code, tree, tree, @@ -123,7 +122,6 @@ extern tree build_simple_mem_ref_loc (location_t, tree); extern poly_offset_int mem_ref_offset (const_tree); extern tree build_invariant_address (tree, tree, poly_int64); extern tree constant_boolean_node (bool, tree); -extern tree div_if_zero_remainder (const_tree, const_tree); extern bool tree_swap_operands_p (const_tree, const_tree); extern enum tree_code swap_tree_comparison (enum tree_code); diff --git a/gcc/function.c b/gcc/function.c index 302438323c8..c07049fd1c5 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1259,25 +1259,6 @@ struct GTY(()) initial_value_struct { initial_value_pair * GTY ((length ("%h.num_entries"))) entries; }; -/* If a pseudo represents an initial hard reg (or expression), return - it, else return NULL_RTX. */ - -rtx -get_hard_reg_initial_reg (rtx reg) -{ - struct initial_value_struct *ivs = crtl->hard_reg_initial_vals; - int i; - - if (ivs == 0) - return NULL_RTX; - - for (i = 0; i < ivs->num_entries; i++) - if (rtx_equal_p (ivs->entries[i].pseudo, reg)) - return ivs->entries[i].hard_reg; - - return NULL_RTX; -} - /* Make sure that there's a pseudo register of mode MODE that stores the initial value of hard register REGNO. Return an rtx for such a pseudo. */ @@ -4683,13 +4664,6 @@ get_next_funcdef_no (void) return funcdef_no++; } -/* Return value of funcdef. */ -int -get_last_funcdef_no (void) -{ - return funcdef_no; -} - /* Allocate a function structure for FNDECL and set its contents to the defaults. Set cfun to the newly-allocated object. Some of the helper functions invoked during initialization assume diff --git a/gcc/function.h b/gcc/function.h index 7e59050e8a6..7ce2d8c77bc 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -596,7 +596,6 @@ extern void free_temp_slots (void); extern void push_temp_slots (void); extern void pop_temp_slots (void); extern void init_temp_slots (void); -extern rtx get_hard_reg_initial_reg (rtx); extern rtx get_hard_reg_initial_val (machine_mode, unsigned int); extern rtx has_hard_reg_initial_val (machine_mode, unsigned int); @@ -629,7 +628,6 @@ extern void push_cfun (struct function *new_cfun); extern void pop_cfun (void); extern int get_next_funcdef_no (void); -extern int get_last_funcdef_no (void); extern void allocate_struct_function (tree, bool); extern void push_struct_function (tree fndecl); extern void push_dummy_function (bool); diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c index f83fc136d04..83f8925f9d3 100644 --- a/gcc/ggc-common.c +++ b/gcc/ggc-common.c @@ -164,37 +164,6 @@ ggc_realloc (void *x, size_t size MEM_STAT_DECL) return r; } -void * -ggc_cleared_alloc_htab_ignore_args (size_t c ATTRIBUTE_UNUSED, - size_t n ATTRIBUTE_UNUSED) -{ - gcc_assert (c * n == sizeof (struct htab)); - return ggc_cleared_alloc (); -} - -/* TODO: once we actually use type information in GGC, create a new tag - gt_gcc_ptr_array and use it for pointer arrays. */ -void * -ggc_cleared_alloc_ptr_array_two_args (size_t c, size_t n) -{ - gcc_assert (sizeof (PTR *) == n); - return ggc_cleared_vec_alloc (c); -} - -/* These are for splay_tree_new_ggc. */ -void * -ggc_splay_alloc (int sz, void *nl) -{ - gcc_assert (!nl); - return ggc_internal_alloc (sz); -} - -void -ggc_splay_dont_free (void * x ATTRIBUTE_UNUSED, void *nl) -{ - gcc_assert (!nl); -} - /* Print statistics that are independent of the collector in use. */ #define SCALE(x) ((unsigned long) ((x) < 1024*10 \ ? (x) \ diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c index d07c89bebab..9b8a0b1a375 100644 --- a/gcc/gimple-expr.c +++ b/gcc/gimple-expr.c @@ -613,47 +613,6 @@ is_gimple_condexpr (tree t) && is_gimple_val (TREE_OPERAND (t, 1)))); } -/* Return true if T is a gimple address. */ - -bool -is_gimple_address (const_tree t) -{ - tree op; - - if (TREE_CODE (t) != ADDR_EXPR) - return false; - - op = TREE_OPERAND (t, 0); - while (handled_component_p (op)) - { - if ((TREE_CODE (op) == ARRAY_REF - || TREE_CODE (op) == ARRAY_RANGE_REF) - && !is_gimple_val (TREE_OPERAND (op, 1))) - return false; - - op = TREE_OPERAND (op, 0); - } - - if (CONSTANT_CLASS_P (op) - || TREE_CODE (op) == TARGET_MEM_REF - || TREE_CODE (op) == MEM_REF) - return true; - - switch (TREE_CODE (op)) - { - case PARM_DECL: - case RESULT_DECL: - case LABEL_DECL: - case FUNCTION_DECL: - case VAR_DECL: - case CONST_DECL: - return true; - - default: - return false; - } -} - /* Return true if T is a gimple invariant address. */ bool diff --git a/gcc/gimple-expr.h b/gcc/gimple-expr.h index 96733bdd7b4..277b55054ec 100644 --- a/gcc/gimple-expr.h +++ b/gcc/gimple-expr.h @@ -41,7 +41,6 @@ extern void gimple_cond_get_ops_from_tree (tree, enum tree_code *, tree *, tree *); extern bool is_gimple_lvalue (tree); extern bool is_gimple_condexpr (tree); -extern bool is_gimple_address (const_tree); extern bool is_gimple_invariant_address (const_tree); extern bool is_gimple_ip_invariant_address (const_tree); extern bool is_gimple_min_invariant (const_tree); diff --git a/gcc/gimple-iterator.c b/gcc/gimple-iterator.c index c0131f3654c..6b3e83e2630 100644 --- a/gcc/gimple-iterator.c +++ b/gcc/gimple-iterator.c @@ -631,20 +631,6 @@ gsi_for_stmt (gimple *stmt, gimple_seq *seq) return i; } -/* Finds iterator for PHI. */ - -gphi_iterator -gsi_for_phi (gphi *phi) -{ - gphi_iterator i; - basic_block bb = gimple_bb (phi); - - i = gsi_start_phis (bb); - i.ptr = phi; - - return i; -} - /* Move the statement at FROM so it comes right after the statement at TO. */ void diff --git a/gcc/gimple-iterator.h b/gcc/gimple-iterator.h index e23d4b2c47c..7b7881492f8 100644 --- a/gcc/gimple-iterator.h +++ b/gcc/gimple-iterator.h @@ -80,7 +80,6 @@ extern void gsi_insert_after (gimple_stmt_iterator *, gimple *, extern bool gsi_remove (gimple_stmt_iterator *, bool); extern gimple_stmt_iterator gsi_for_stmt (gimple *); extern gimple_stmt_iterator gsi_for_stmt (gimple *, gimple_seq *); -extern gphi_iterator gsi_for_phi (gphi *); extern void gsi_move_after (gimple_stmt_iterator *, gimple_stmt_iterator *); extern void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *); extern void gsi_move_to_bb_end (gimple_stmt_iterator *, basic_block); diff --git a/gcc/gimple-ssa-sprintf.c b/gcc/gimple-ssa-sprintf.c index 471bfc45eb8..bd8a2ca21e3 100644 --- a/gcc/gimple-ssa-sprintf.c +++ b/gcc/gimple-ssa-sprintf.c @@ -228,45 +228,8 @@ struct format_result avoid issuing duplicate warnings while finishing the processing of a call. WARNED also disables the return value optimization. */ bool warned; - - /* Preincrement the number of output characters by 1. */ - format_result& operator++ () - { - return *this += 1; - } - - /* Postincrement the number of output characters by 1. */ - format_result operator++ (int) - { - format_result prev (*this); - *this += 1; - return prev; - } - - /* Increment the number of output characters by N. */ - format_result& operator+= (unsigned HOST_WIDE_INT); }; -format_result& -format_result::operator+= (unsigned HOST_WIDE_INT n) -{ - gcc_assert (n < HOST_WIDE_INT_MAX); - - if (range.min < HOST_WIDE_INT_MAX) - range.min += n; - - if (range.max < HOST_WIDE_INT_MAX) - range.max += n; - - if (range.likely < HOST_WIDE_INT_MAX) - range.likely += n; - - if (range.unlikely < HOST_WIDE_INT_MAX) - range.unlikely += n; - - return *this; -} - /* Return the value of INT_MIN for the target. */ static inline HOST_WIDE_INT @@ -727,14 +690,6 @@ struct directive |= (1U << (c % (CHAR_BIT * sizeof *flags))); } - /* Reset the format flag CHR. */ - void clear_flag (char chr) - { - unsigned char c = chr & 0xff; - flags[c / (CHAR_BIT * sizeof *flags)] - &= ~(1U << (c % (CHAR_BIT * sizeof *flags))); - } - /* Set both bounds of the width range to VAL. */ void set_width (HOST_WIDE_INT val) { diff --git a/gcc/gimple-ssa-warn-alloca.c b/gcc/gimple-ssa-warn-alloca.c index d1b1de4a2d5..d75d4a150c3 100644 --- a/gcc/gimple-ssa-warn-alloca.c +++ b/gcc/gimple-ssa-warn-alloca.c @@ -125,7 +125,6 @@ struct alloca_type_and_limit { // integer_zero_node if unknown. For any other alloca types, this // field is undefined. wide_int limit; - alloca_type_and_limit (); alloca_type_and_limit (enum alloca_type type, wide_int i) : type(type), limit(i) { } alloca_type_and_limit (enum alloca_type type) : type(type) diff --git a/gcc/gimple.c b/gcc/gimple.c index e3e651b1e61..a1e6d2c6810 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -2528,15 +2528,6 @@ gimple_signed_or_unsigned_type (bool unsignedp, tree type) } -/* Return an unsigned type the same as TYPE in other respects. */ - -tree -gimple_unsigned_type (tree type) -{ - return gimple_signed_or_unsigned_type (true, type); -} - - /* Return a signed type the same as TYPE in other respects. */ tree @@ -2647,19 +2638,6 @@ gimple_builtin_call_types_compatible_p (const gimple *stmt, tree fndecl) return true; } -/* Return true when STMT is builtins call. */ - -bool -gimple_call_builtin_p (const gimple *stmt) -{ - tree fndecl; - if (is_gimple_call (stmt) - && (fndecl = gimple_call_fndecl (stmt)) != NULL_TREE - && DECL_BUILT_IN_CLASS (fndecl) != NOT_BUILT_IN) - return gimple_builtin_call_types_compatible_p (stmt, fndecl); - return false; -} - /* Return true when STMT is builtins call to CLASS. */ bool diff --git a/gcc/gimple.h b/gcc/gimple.h index a5dda9369bc..6d4cc0f2adf 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -1509,13 +1509,11 @@ unsigned get_gimple_rhs_num_ops (enum tree_code); extern tree canonicalize_cond_expr_cond (tree); gcall *gimple_call_copy_skip_args (gcall *, bitmap); extern bool gimple_compare_field_offset (tree, tree); -extern tree gimple_unsigned_type (tree); extern tree gimple_signed_type (tree); extern alias_set_type gimple_get_alias_set (tree); extern bool gimple_ior_addresses_taken (bitmap, gimple *); extern bool gimple_builtin_call_types_compatible_p (const gimple *, tree); extern combined_fn gimple_call_combined_fn (const gimple *); -extern bool gimple_call_builtin_p (const gimple *); extern bool gimple_call_builtin_p (const gimple *, enum built_in_class); extern bool gimple_call_builtin_p (const gimple *, enum built_in_function); extern bool gimple_asm_clobbers_memory_p (const gasm *); diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 509fc2f3f5b..59531d35f35 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -332,14 +332,6 @@ gimple_pop_bind_expr (void) gimplify_ctxp->bind_expr_stack.pop (); } -/* Return the first element of the stack of bindings. */ - -gbind * -gimple_current_bind_expr (void) -{ - return gimplify_ctxp->bind_expr_stack.last (); -} - /* Return the stack of bindings created during gimplification. */ vec diff --git a/gcc/gimplify.h b/gcc/gimplify.h index 62ca869083a..14abc94d9af 100644 --- a/gcc/gimplify.h +++ b/gcc/gimplify.h @@ -53,7 +53,6 @@ extern void free_gimplify_stack (void); extern void push_gimplify_context (bool in_ssa = false, bool rhs_cond_ok = false); extern void pop_gimplify_context (gimple *); -extern gbind *gimple_current_bind_expr (void); extern vec gimple_bind_expr_stack (void); extern void gimplify_and_add (tree, gimple_seq *); extern tree get_formal_tmp_var (tree, gimple_seq *); diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 1fdc9df9fb2..f154fe092e8 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -574,7 +574,7 @@ haifa_classify_insn (const_rtx insn) MAX_STAGES provides us with a limit after which we give up scheduling; the caller must have unrolled at least as many copies of the loop body and recorded delay_pairs for them. - + INSNS is the number of real (non-debug) insns in one iteration of the loop. MAX_UID can be used to test whether an insn belongs to the first iteration of the loop; all of them have a uid lower than diff --git a/gcc/hsa-common.c b/gcc/hsa-common.c index 0e18fa74a2c..52712dde5f2 100644 --- a/gcc/hsa-common.c +++ b/gcc/hsa-common.c @@ -716,27 +716,6 @@ hsa_free_decl_kernel_mapping (void) ggc_free (hsa_decl_kernel_mapping); } -/* Add new kernel dependency. */ - -void -hsa_add_kernel_dependency (tree caller, const char *called_function) -{ - if (hsa_decl_kernel_dependencies == NULL) - hsa_decl_kernel_dependencies = new hash_map *> (); - - vec *s = NULL; - vec **slot = hsa_decl_kernel_dependencies->get (caller); - if (slot == NULL) - { - s = new vec (); - hsa_decl_kernel_dependencies->put (caller, s); - } - else - s = *slot; - - s->safe_push (called_function); -} - /* Expansion to HSA needs a few gc roots to hold types, constructors etc. In order to minimize the number of GTY roots, we'll root them all in the following array. The individual elements should only be accessed by the @@ -772,22 +751,6 @@ hsa_sanitize_name (char *p) *p = '_'; } -/* Clone the name P, set trailing ampersand and sanitize the name. */ - -char * -hsa_brig_function_name (const char *p) -{ - unsigned len = strlen (p); - char *buf = XNEWVEC (char, len + 2); - - buf[0] = '&'; - buf[len + 1] = '\0'; - memcpy (buf + 1, p, len); - - hsa_sanitize_name (buf); - return buf; -} - /* Add a flatten attribute and disable vectorization for gpu implementation function decl GDECL. */ diff --git a/gcc/hsa-common.h b/gcc/hsa-common.h index c72343fbdab..7bfc14c8c7e 100644 --- a/gcc/hsa-common.h +++ b/gcc/hsa-common.h @@ -1356,9 +1356,7 @@ void hsa_free_decl_kernel_mapping (void); tree *hsa_get_ctor_statements (void); tree *hsa_get_dtor_statements (void); tree *hsa_get_kernel_dispatch_type (void); -void hsa_add_kernel_dependency (tree caller, const char *called_function); void hsa_sanitize_name (char *p); -char *hsa_brig_function_name (const char *p); const char *hsa_get_declaration_name (tree decl); void hsa_register_kernel (cgraph_node *host); void hsa_register_kernel (cgraph_node *gpu, cgraph_node *host); diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 27ae8e0fe27..bf4814c7aba 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -313,7 +313,6 @@ public: inline bool top_p () const; inline bool set_to_bottom (); bool meet_with (const value_range *p_vr); - bool meet_with (const ipcp_vr_lattice &other); void init () { m_vr.type = VR_UNDEFINED; } void print (FILE * f); @@ -899,12 +898,6 @@ set_agg_lats_contain_variable (struct ipcp_param_lattices *plats) return ret; } -bool -ipcp_vr_lattice::meet_with (const ipcp_vr_lattice &other) -{ - return meet_with_1 (&other.m_vr); -} - /* Meet the current value of the lattice with value ranfge described by VR lattice. */ diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 9564d651b2b..71a5be99bde 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -2818,27 +2818,6 @@ vtable_pointer_value_to_vtable (const_tree t, tree *v, return true; } -/* T is known constant value of virtual table pointer. Return BINFO of the - instance type. */ - -tree -vtable_pointer_value_to_binfo (const_tree t) -{ - tree vtable; - unsigned HOST_WIDE_INT offset; - - if (!vtable_pointer_value_to_vtable (t, &vtable, &offset)) - return NULL_TREE; - - /* FIXME: for stores of construction vtables we return NULL, - because we do not have BINFO for those. Eventually we should fix - our representation to allow this case to be handled, too. - In the case we see store of BINFO we however may assume - that standard folding will be able to cope with it. */ - return subbinfo_with_vtable_at_offset (TYPE_BINFO (DECL_CONTEXT (vtable)), - offset, vtable); -} - /* Walk bases of OUTER_TYPE that contain OTR_TYPE at OFFSET. Look up their respective virtual methods for OTR_TOKEN and OTR_TYPE and insert them in NODES. diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index ba39ea36574..d8d551d64ae 100644 --- a/gcc/ipa-icf-gimple.c +++ b/gcc/ipa-icf-gimple.c @@ -855,14 +855,6 @@ func_checker::compare_gimple_cond (gimple *s1, gimple *s2) return compare_operand (t1, t2); } -/* Verifies that tree labels T1 and T2 correspond in FUNC1 and FUNC2. */ - -bool -func_checker::compare_tree_ssa_label (tree t1, tree t2) -{ - return compare_operand (t1, t2); -} - /* Verifies for given GIMPLE_LABEL stmts S1 and S2 that label statements are semantically equivalent. */ diff --git a/gcc/ipa-icf-gimple.h b/gcc/ipa-icf-gimple.h index 65dfe69deeb..66c36380d26 100644 --- a/gcc/ipa-icf-gimple.h +++ b/gcc/ipa-icf-gimple.h @@ -200,9 +200,6 @@ public: /* Verification function for declaration trees T1 and T2. */ bool compare_decl (tree t1, tree t2); - /* Verifies that tree labels T1 and T2 correspond. */ - bool compare_tree_ssa_label (tree t1, tree t2); - /* Function compare for equality given memory operands T1 and T2. */ bool compare_memory_operand (tree t1, tree t2); @@ -219,10 +216,6 @@ public: and compare both TREE_PURPOSEs and TREE_VALUEs. */ bool compare_asm_inputs_outputs (tree t1, tree t2); - /* Verifies that trees T1 and T2, representing function declarations - are equivalent from perspective of ICF. */ - bool compare_function_decl (tree t1, tree t2); - /* Verifies that trees T1 and T2 do correspond. */ bool compare_variable_decl (tree t1, tree t2); diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 3c54f8d4b6d..59adb9459a7 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -137,12 +137,6 @@ sem_usage_pair::sem_usage_pair (sem_item *_item, unsigned int _index) { } -sem_item::sem_item (sem_item_type _type, bitmap_obstack *stack) -: type (_type), m_hash (-1), m_hash_set (false) -{ - setup (stack); -} - sem_item::sem_item (sem_item_type _type, symtab_node *_node, bitmap_obstack *stack) : type (_type), node (_node), m_hash (-1), m_hash_set (false) @@ -229,15 +223,6 @@ void sem_item::set_hash (hashval_t hash) hash_map sem_item::m_type_hash_cache; -/* Semantic function constructor that uses STACK as bitmap memory stack. */ - -sem_function::sem_function (bitmap_obstack *stack) -: sem_item (FUNC, stack), m_checker (NULL), m_compared_func (NULL) -{ - bb_sizes.create (0); - bb_sorted.create (0); -} - sem_function::sem_function (cgraph_node *node, bitmap_obstack *stack) : sem_item (FUNC, node, stack), m_checker (NULL), m_compared_func (NULL) { @@ -1791,17 +1776,6 @@ sem_function::compare_phi_node (basic_block bb1, basic_block bb2) return true; } -/* Returns true if tree T can be compared as a handled component. */ - -bool -sem_function::icf_handled_component_p (tree t) -{ - tree_code tc = TREE_CODE (t); - - return (handled_component_p (t) - || tc == ADDR_EXPR || tc == MEM_REF || tc == OBJ_TYPE_REF); -} - /* Basic blocks dictionary BB_DICT returns true if SOURCE index BB corresponds to TARGET. */ @@ -1823,10 +1797,6 @@ sem_function::bb_dict_test (vec *bb_dict, int source, int target) return (*bb_dict)[source] == target; } -sem_variable::sem_variable (bitmap_obstack *stack): sem_item (VAR, stack) -{ -} - sem_variable::sem_variable (varpool_node *node, bitmap_obstack *stack) : sem_item (VAR, node, stack) { diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h index a64b3852efb..305b23befc4 100644 --- a/gcc/ipa-icf.h +++ b/gcc/ipa-icf.h @@ -148,10 +148,6 @@ typedef std::pair symtab_pair; class sem_item { public: - /* Semantic item constructor for a node of _TYPE, where STACK is used - for bitmap memory allocation. */ - sem_item (sem_item_type _type, bitmap_obstack *stack); - /* Semantic item constructor for a node of _TYPE, where STACK is used for bitmap memory allocation. The item is based on symtab node _NODE. */ sem_item (sem_item_type _type, symtab_node *_node, bitmap_obstack *stack); @@ -200,10 +196,6 @@ public: void update_hash_by_local_refs (hash_map &m_symtab_node_map); - /* Return base tree that can be used for compatible_types_p and - contains_polymorphic_type_p comparison. */ - static bool get_base_types (tree *t1, tree *t2); - /* Return true if target supports alias symbols. */ bool target_supports_symbol_aliases_p (void); @@ -289,9 +281,6 @@ private: class sem_function: public sem_item { public: - /* Semantic function constructor that uses STACK as bitmap memory stack. */ - sem_function (bitmap_obstack *stack); - /* Constructor based on callgraph node _NODE. Bitmap STACK is used for memory allocation. */ sem_function (cgraph_node *_node, bitmap_obstack *stack); @@ -384,9 +373,6 @@ private: /* Processes function equality comparison. */ bool equals_private (sem_item *item); - /* Returns true if tree T can be compared as a handled component. */ - static bool icf_handled_component_p (tree t); - /* Function checker stores binding between functions. */ ipa_icf_gimple::func_checker *m_checker; @@ -397,9 +383,6 @@ private: class sem_variable: public sem_item { public: - /* Semantic variable constructor that uses STACK as bitmap memory stack. */ - sem_variable (bitmap_obstack *stack); - /* Constructor based on callgraph node _NODE. Bitmap STACK is used for memory allocation. */ diff --git a/gcc/ipa-param-manipulation.c b/gcc/ipa-param-manipulation.c index 1e3a92a125f..9a631c093ff 100644 --- a/gcc/ipa-param-manipulation.c +++ b/gcc/ipa-param-manipulation.c @@ -478,112 +478,6 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, gcall *stmt, while (gsi_stmt (gsi) != gsi_stmt (prev_gsi)); } -/* Return true iff BASE_INDEX is in ADJUSTMENTS more than once. */ - -static bool -index_in_adjustments_multiple_times_p (int base_index, - ipa_parm_adjustment_vec adjustments) -{ - int i, len = adjustments.length (); - bool one = false; - - for (i = 0; i < len; i++) - { - struct ipa_parm_adjustment *adj; - adj = &adjustments[i]; - - if (adj->base_index == base_index) - { - if (one) - return true; - else - one = true; - } - } - return false; -} - -/* Return adjustments that should have the same effect on function parameters - and call arguments as if they were first changed according to adjustments in - INNER and then by adjustments in OUTER. */ - -ipa_parm_adjustment_vec -ipa_combine_adjustments (ipa_parm_adjustment_vec inner, - ipa_parm_adjustment_vec outer) -{ - int i, outlen = outer.length (); - int inlen = inner.length (); - int removals = 0; - ipa_parm_adjustment_vec adjustments, tmp; - - tmp.create (inlen); - for (i = 0; i < inlen; i++) - { - struct ipa_parm_adjustment *n; - n = &inner[i]; - - if (n->op == IPA_PARM_OP_REMOVE) - removals++; - else - { - /* FIXME: Handling of new arguments are not implemented yet. */ - gcc_assert (n->op != IPA_PARM_OP_NEW); - tmp.quick_push (*n); - } - } - - adjustments.create (outlen + removals); - for (i = 0; i < outlen; i++) - { - struct ipa_parm_adjustment r; - struct ipa_parm_adjustment *out = &outer[i]; - struct ipa_parm_adjustment *in = &tmp[out->base_index]; - - memset (&r, 0, sizeof (r)); - gcc_assert (in->op != IPA_PARM_OP_REMOVE); - if (out->op == IPA_PARM_OP_REMOVE) - { - if (!index_in_adjustments_multiple_times_p (in->base_index, tmp)) - { - r.op = IPA_PARM_OP_REMOVE; - adjustments.quick_push (r); - } - continue; - } - else - { - /* FIXME: Handling of new arguments are not implemented yet. */ - gcc_assert (out->op != IPA_PARM_OP_NEW); - } - - r.base_index = in->base_index; - r.type = out->type; - - /* FIXME: Create nonlocal value too. */ - - if (in->op == IPA_PARM_OP_COPY && out->op == IPA_PARM_OP_COPY) - r.op = IPA_PARM_OP_COPY; - else if (in->op == IPA_PARM_OP_COPY) - r.offset = out->offset; - else if (out->op == IPA_PARM_OP_COPY) - r.offset = in->offset; - else - r.offset = in->offset + out->offset; - adjustments.quick_push (r); - } - - for (i = 0; i < inlen; i++) - { - struct ipa_parm_adjustment *n = &inner[i]; - - if (n->op == IPA_PARM_OP_REMOVE) - adjustments.quick_push (*n); - } - - tmp.release (); - return adjustments; -} - /* If T is an SSA_NAME, return NULL if it is not a default def or return its base variable if it is. If IGNORE_DEFAULT_DEF is true, the base variable is always returned, regardless if it is a default diff --git a/gcc/ipa-param-manipulation.h b/gcc/ipa-param-manipulation.h index 84bc42d5196..51c4a84ddb6 100644 --- a/gcc/ipa-param-manipulation.h +++ b/gcc/ipa-param-manipulation.h @@ -108,8 +108,6 @@ vec ipa_get_vector_of_formal_parm_types (tree fntype); void ipa_modify_formal_parameters (tree fndecl, ipa_parm_adjustment_vec); void ipa_modify_call_arguments (struct cgraph_edge *, gcall *, ipa_parm_adjustment_vec); -ipa_parm_adjustment_vec ipa_combine_adjustments (ipa_parm_adjustment_vec, - ipa_parm_adjustment_vec); void ipa_dump_param_adjustments (FILE *, ipa_parm_adjustment_vec, tree); bool ipa_modify_expr (tree *, bool, ipa_parm_adjustment_vec); diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h index 55e10cf0f27..450720db1c8 100644 --- a/gcc/ipa-prop.h +++ b/gcc/ipa-prop.h @@ -680,8 +680,6 @@ extern GTY(()) function_summary *ipcp_transformation_sum #define IS_VALID_JUMP_FUNC_INDEX(I) ((I) != -1) /* Creating and freeing ipa_node_params and ipa_edge_args. */ -void ipa_create_all_node_params (void); -void ipa_create_all_edge_args (void); void ipa_check_create_edge_args (void); void ipa_free_all_node_params (void); void ipa_free_all_edge_args (void); diff --git a/gcc/ipa-ref.h b/gcc/ipa-ref.h index 4e22d85ac03..69fdf933aec 100644 --- a/gcc/ipa-ref.h +++ b/gcc/ipa-ref.h @@ -72,14 +72,6 @@ typedef struct ipa_ref *ipa_ref_ptr; struct GTY(()) ipa_ref_list { public: - /* Return first reference in list or NULL if empty. */ - struct ipa_ref *first_reference (void) - { - if (!vec_safe_length (references)) - return NULL; - return &(*references)[0]; - } - /* Return first referring ref in list or NULL if empty. */ struct ipa_ref *first_referring (void) { @@ -108,12 +100,6 @@ public: return i == 0 ? NULL : referring[i - 1]; } - /* Return true if the symbol has an alias. */ - bool inline has_aliases_p (void) - { - return first_alias (); - } - /* Clear reference list. */ void clear (void) { diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index 98f2a75cd81..75f39bf00ed 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -74,7 +74,6 @@ bool possible_polymorphic_call_target_p (tree, HOST_WIDE_INT, tree polymorphic_ctor_dtor_p (tree, bool); tree inlined_polymorphic_ctor_dtor_block_p (tree, bool); bool decl_maybe_in_construction_p (tree, tree, gimple *, tree); -tree vtable_pointer_value_to_binfo (const_tree); bool vtable_pointer_value_to_vtable (const_tree, tree *, unsigned HOST_WIDE_INT *); tree subbinfo_with_vtable_at_offset (tree, unsigned HOST_WIDE_INT, tree); void compare_virtual_tables (varpool_node *, varpool_node *); diff --git a/gcc/lto-section-in.c b/gcc/lto-section-in.c index f4d340ff5a3..b8018bad4c7 100644 --- a/gcc/lto-section-in.c +++ b/gcc/lto-section-in.c @@ -375,18 +375,6 @@ lto_new_in_decl_state (void) return ggc_cleared_alloc (); } -/* Delete STATE and its components. */ - -void -lto_delete_in_decl_state (struct lto_in_decl_state *state) -{ - int i; - - for (i = 0; i < LTO_N_DECL_STREAMS; i++) - vec_free (state->streams[i]); - ggc_free (state); -} - /* Search the in-decl state of a function FUNC contained in the file associated with FILE_DATA. Return NULL if not found. */ diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 4ddcc8f7ddd..d0c32fa8e98 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -81,19 +81,6 @@ lto_tag_check_set (enum LTO_tags actual, int ntags, ...) } -/* Read LENGTH bytes from STREAM to ADDR. */ - -void -lto_input_data_block (struct lto_input_block *ib, void *addr, size_t length) -{ - size_t i; - unsigned char *const buffer = (unsigned char *) addr; - - for (i = 0; i < length; i++) - buffer[i] = streamer_read_uchar (ib); -} - - /* Lookup STRING in file_name_hash_table. If found, return the existing string, otherwise insert STRING as the canonical version. */ diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c index f51d6657461..93b207a97d8 100644 --- a/gcc/lto-streamer.c +++ b/gcc/lto-streamer.c @@ -273,16 +273,6 @@ lto_streamer_init (void) } -/* Gate function for all LTO streaming passes. */ - -bool -gate_lto_out (void) -{ - return ((flag_generate_lto || flag_generate_offload || in_lto_p) - /* Don't bother doing anything if the program has errors. */ - && !seen_error ()); -} - /* Check that the version MAJOR.MINOR is the correct version number. */ void diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h index dd279f6762b..95fcb30b0ae 100644 --- a/gcc/lto-streamer.h +++ b/gcc/lto-streamer.h @@ -772,7 +772,6 @@ extern void lto_record_renamed_decl (struct lto_file_decl_data *, extern const char *lto_get_decl_name_mapping (struct lto_file_decl_data *, const char *); extern struct lto_in_decl_state *lto_new_in_decl_state (void); -extern void lto_delete_in_decl_state (struct lto_in_decl_state *); extern struct lto_in_decl_state *lto_get_function_in_decl_state ( struct lto_file_decl_data *, tree); extern void lto_free_function_in_decl_state (struct lto_in_decl_state *); @@ -827,7 +826,6 @@ extern void lto_bitmap_free (bitmap); extern char *lto_get_section_name (int, const char *, struct lto_file_decl_data *); extern void print_lto_report (const char *); extern void lto_streamer_init (void); -extern bool gate_lto_out (void); extern void lto_check_version (int, int, const char *); extern void lto_streamer_hooks_init (void); @@ -848,7 +846,6 @@ extern struct data_in *lto_data_in_create (struct lto_file_decl_data *, const char *, unsigned, vec ); extern void lto_data_in_delete (struct data_in *); -extern void lto_input_data_block (struct lto_input_block *, void *, size_t); void lto_input_location (location_t *, struct bitpack_d *, struct data_in *); location_t stream_input_location_now (struct bitpack_d *bp, struct data_in *data); diff --git a/gcc/predict.c b/gcc/predict.c index ab2dc8ed031..14577a21683 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -516,13 +516,6 @@ edge_predicted_by_p (edge e, enum br_predictor predictor, bool taken) return false; } -/* Same predicate as above, working on edges. */ -bool -edge_probability_reliable_p (const_edge e) -{ - return e->probability.probably_reliable_p (); -} - /* Same predicate as edge_probability_reliable_p, working on notes. */ bool br_prob_note_reliable_p (const_rtx note) diff --git a/gcc/predict.h b/gcc/predict.h index e4d1da090ca..7a3c370e460 100644 --- a/gcc/predict.h +++ b/gcc/predict.h @@ -78,7 +78,6 @@ extern void rtl_profile_for_edge (edge); extern void default_rtl_profile (void); extern bool rtl_predicted_by_p (const_basic_block, enum br_predictor); extern bool gimple_predicted_by_p (const_basic_block, enum br_predictor); -extern bool edge_probability_reliable_p (const_edge); extern bool br_prob_note_reliable_p (const_rtx); extern void predict_insn_def (rtx_insn *, enum br_predictor, enum prediction); extern void rtl_predict_edge (edge, enum br_predictor, int); diff --git a/gcc/read-md.c b/gcc/read-md.c index 174e471a8db..84b68f8a8be 100644 --- a/gcc/read-md.c +++ b/gcc/read-md.c @@ -531,22 +531,6 @@ md_reader::read_name (struct md_name *name) return loc; } -file_location -md_reader::read_name_or_nil (struct md_name *name) -{ - file_location loc; - if (!read_name_1 (name, &loc)) - { - file_location loc = get_current_location (); - read_skip_construct (0, loc); - /* Skip the ')'. */ - read_char (); - name->buffer[0] = 0; - name->string = name->buffer; - } - return loc; -} - /* Subroutine of the string readers. Handles backslash escapes. Caller has read the backslash, but not placed it into the obstack. */ diff --git a/gcc/read-md.h b/gcc/read-md.h index 56d54314f11..c788ac676c6 100644 --- a/gcc/read-md.h +++ b/gcc/read-md.h @@ -171,7 +171,6 @@ class md_reader int read_char (void); void unread_char (int ch); file_location read_name (struct md_name *name); - file_location read_name_or_nil (struct md_name *); void read_escape (); char *read_quoted_string (); char *read_braced_string (); diff --git a/gcc/rtl.h b/gcc/rtl.h index 68d3ceab29f..58cb6b4dedb 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -3199,7 +3199,6 @@ extern rtx convert_memory_address_addr_space (scalar_int_mode, rtx, convert_memory_address_addr_space ((to_mode), (x), ADDR_SPACE_GENERIC) extern const char *get_insn_name (int); extern rtx_insn *get_last_insn_anywhere (void); -extern rtx_insn *get_first_nonnote_insn (void); extern rtx_insn *get_last_nonnote_insn (void); extern void start_sequence (void); extern void push_to_sequence (rtx_insn *); @@ -3232,16 +3231,9 @@ extern rtx_insn *emit_insn_before (rtx, rtx_insn *); extern rtx_insn *emit_insn_before_noloc (rtx, rtx_insn *, basic_block); extern rtx_insn *emit_insn_before_setloc (rtx, rtx_insn *, location_t); extern rtx_jump_insn *emit_jump_insn_before (rtx, rtx_insn *); -extern rtx_jump_insn *emit_jump_insn_before_noloc (rtx, rtx_insn *); -extern rtx_jump_insn *emit_jump_insn_before_setloc (rtx, rtx_insn *, - location_t); -extern rtx_insn *emit_call_insn_before (rtx, rtx_insn *); -extern rtx_insn *emit_call_insn_before_noloc (rtx, rtx_insn *); -extern rtx_insn *emit_call_insn_before_setloc (rtx, rtx_insn *, location_t); extern rtx_insn *emit_debug_insn_before (rtx, rtx_insn *); extern rtx_insn *emit_debug_insn_before_noloc (rtx, rtx_insn *); extern rtx_insn *emit_debug_insn_before_setloc (rtx, rtx_insn *, location_t); -extern rtx_barrier *emit_barrier_before (rtx_insn *); extern rtx_code_label *emit_label_before (rtx_code_label *, rtx_insn *); extern rtx_note *emit_note_before (enum insn_note, rtx_insn *); extern rtx_insn *emit_insn_after (rtx, rtx_insn *); @@ -3251,8 +3243,6 @@ extern rtx_jump_insn *emit_jump_insn_after (rtx, rtx_insn *); extern rtx_jump_insn *emit_jump_insn_after_noloc (rtx, rtx_insn *); extern rtx_jump_insn *emit_jump_insn_after_setloc (rtx, rtx_insn *, location_t); extern rtx_insn *emit_call_insn_after (rtx, rtx_insn *); -extern rtx_insn *emit_call_insn_after_noloc (rtx, rtx_insn *); -extern rtx_insn *emit_call_insn_after_setloc (rtx, rtx_insn *, location_t); extern rtx_insn *emit_debug_insn_after (rtx, rtx_insn *); extern rtx_insn *emit_debug_insn_after_noloc (rtx, rtx_insn *); extern rtx_insn *emit_debug_insn_after_setloc (rtx, rtx_insn *, location_t); diff --git a/gcc/toplev.h b/gcc/toplev.h index 98f3ceea872..4c5a89eaa61 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -93,11 +93,6 @@ extern bool set_src_pwd (const char *); extern HOST_WIDE_INT get_random_seed (bool); extern void set_random_seed (const char *); -extern unsigned int min_align_loops_log; -extern unsigned int min_align_jumps_log; -extern unsigned int min_align_labels_log; -extern unsigned int min_align_functions_log; - extern void parse_alignment_opts (void); extern void initialize_rtl (void); diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h index 29caab71154..64f21419726 100644 --- a/gcc/tree-inline.h +++ b/gcc/tree-inline.h @@ -184,10 +184,6 @@ struct eni_weights bool time_based; }; -/* Weights that estimate_num_insns uses for heuristics in inlining. */ - -extern eni_weights eni_inlining_weights; - /* Weights that estimate_num_insns uses to estimate the size of the produced code. */ -- 2.19.0