From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22417 invoked by alias); 6 Aug 2014 17:42:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 22350 invoked by uid 89); 6 Aug 2014 17:42:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 06 Aug 2014 17:42:45 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XF4t2-0000uT-1Z for gcc-patches@gcc.gnu.org; Wed, 06 Aug 2014 13:20:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF4t1-0000uH-NA for gcc-patches@gcc.gnu.org; Wed, 06 Aug 2014 13:20:27 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s76HJRYq012295 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 6 Aug 2014 13:19:27 -0400 Received: from c64.redhat.com (vpn-239-139.phx2.redhat.com [10.3.239.139]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s76HJ2oH030913; Wed, 6 Aug 2014 13:19:26 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH 041/236] Debug hooks: use rtx_insn and rtx_code_label Date: Wed, 06 Aug 2014 17:42:00 -0000 Message-Id: <1407345815-14551-42-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00645.txt.bz2 gcc/ * debug.h (struct gcc_debug_hooks): Strengthen param 1 of hook "label" from rtx to rtx_code_label *. Strengthen param 1 o "var_location" hook from rtx to rtx_insn *. (debug_nothing_rtx): Delete in favor of... (debug_nothing_rtx_code_label): New prototype. (debug_nothing_rtx_rtx): Delete unused prototype. (debug_nothing_rtx_insn): New prototype. * final.c (final_scan_insn): Add checked cast to rtx_insn * when invoking debug_hooks->var_location (in two places, one in a NOTE case of a switch statement, the other guarded by a CALL_P conditional. Add checked cast to rtx_code_label * when invoking debug_hooks->label (within CODE_LABEL case of switch statement). * dbxout.c (dbx_debug_hooks): Update "label" hook from debug_nothing_rtx to debug_nothing_rtx_code_label. Update "var_location" from debug_nothing_rtx to debug_nothing_rtx_insn. (xcoff_debug_hooks): Likewise. * debug.c (do_nothing_debug_hooks): Likewise. (debug_nothing_rtx): Delete in favor of... (debug_nothing_rtx_insn): New function. (debug_nothing_rtx_rtx): Delete unused function. (debug_nothing_rtx_code_label): New function. * dwarf2out.c (dwarf2_debug_hooks): Update "label" hook from debug_nothing_rtx to debug_nothing_rtx_code_label. (dwarf2out_var_location): Strengthen param "loc_note" from rtx to rtx_insn *. * sdbout.c (sdb_debug_hooks): Update "var_location" hook from debug_nothing_rtx to debug_nothing_rtx_insn. (sdbout_label): Strengthen param "insn" from rtx to rtx_code_label *. * vmsdbgout.c (vmsdbg_debug_hooks): Update "label" hook from debug_nothing_rtx to debug_nothing_rtx_code_label. Update "var_location" hook from debug_nothing_rtx to debug_nothing_rtx_insn. --- gcc/dbxout.c | 8 ++++---- gcc/debug.c | 9 ++++----- gcc/debug.h | 8 ++++---- gcc/dwarf2out.c | 6 +++--- gcc/final.c | 6 +++--- gcc/sdbout.c | 6 +++--- gcc/vmsdbgout.c | 4 ++-- 7 files changed, 23 insertions(+), 24 deletions(-) diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 6cb4341..a41db37 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -371,9 +371,9 @@ const struct gcc_debug_hooks dbx_debug_hooks = debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */ debug_nothing_tree, /* deferred_inline_function */ debug_nothing_tree, /* outlining_inline_function */ - debug_nothing_rtx, /* label */ + debug_nothing_rtx_code_label, /* label */ dbxout_handle_pch, /* handle_pch */ - debug_nothing_rtx, /* var_location */ + debug_nothing_rtx_insn, /* var_location */ debug_nothing_void, /* switch_text_section */ debug_nothing_tree_tree, /* set_name */ 0, /* start_end_main_source_file */ @@ -407,9 +407,9 @@ const struct gcc_debug_hooks xcoff_debug_hooks = debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */ debug_nothing_tree, /* deferred_inline_function */ debug_nothing_tree, /* outlining_inline_function */ - debug_nothing_rtx, /* label */ + debug_nothing_rtx_code_label, /* label */ dbxout_handle_pch, /* handle_pch */ - debug_nothing_rtx, /* var_location */ + debug_nothing_rtx_insn, /* var_location */ debug_nothing_void, /* switch_text_section */ debug_nothing_tree_tree, /* set_name */ 0, /* start_end_main_source_file */ diff --git a/gcc/debug.c b/gcc/debug.c index 1734540..dba068c 100644 --- a/gcc/debug.c +++ b/gcc/debug.c @@ -48,9 +48,9 @@ const struct gcc_debug_hooks do_nothing_debug_hooks = debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */ debug_nothing_tree, /* deferred_inline_function */ debug_nothing_tree, /* outlining_inline_function */ - debug_nothing_rtx, /* label */ + debug_nothing_rtx_code_label, /* label */ debug_nothing_int, /* handle_pch */ - debug_nothing_rtx, /* var_location */ + debug_nothing_rtx_insn, /* var_location */ debug_nothing_void, /* switch_text_section */ debug_nothing_tree_tree, /* set_name */ 0, /* start_end_main_source_file */ @@ -91,13 +91,12 @@ debug_true_const_tree (const_tree block ATTRIBUTE_UNUSED) } void -debug_nothing_rtx (rtx insn ATTRIBUTE_UNUSED) +debug_nothing_rtx_insn (rtx_insn *insn ATTRIBUTE_UNUSED) { } void -debug_nothing_rtx_rtx (rtx insn ATTRIBUTE_UNUSED, - rtx new_insn ATTRIBUTE_UNUSED) +debug_nothing_rtx_code_label (rtx_code_label *label ATTRIBUTE_UNUSED) { } diff --git a/gcc/debug.h b/gcc/debug.h index fc57589..3ac7976 100644 --- a/gcc/debug.h +++ b/gcc/debug.h @@ -119,14 +119,14 @@ struct gcc_debug_hooks /* Called from final_scan_insn for any CODE_LABEL insn whose LABEL_NAME is non-null. */ - void (* label) (rtx); + void (* label) (rtx_code_label *); /* Called after the start and before the end of writing a PCH file. The parameter is 0 if after the start, 1 if before the end. */ void (* handle_pch) (unsigned int); /* Called from final_scan_insn for any NOTE_INSN_VAR_LOCATION note. */ - void (* var_location) (rtx); + void (* var_location) (rtx_insn *); /* Called from final_scan_insn if there is a switch between hot and cold text sections. */ @@ -160,8 +160,8 @@ extern void debug_nothing_tree_tree (tree, tree); extern void debug_nothing_tree_int (tree, int); extern void debug_nothing_tree_tree_tree_bool (tree, tree, tree, bool); extern bool debug_true_const_tree (const_tree); -extern void debug_nothing_rtx (rtx); -extern void debug_nothing_rtx_rtx (rtx, rtx); +extern void debug_nothing_rtx_insn (rtx_insn *); +extern void debug_nothing_rtx_code_label (rtx_code_label *); /* Hooks for various debug formats. */ extern const struct gcc_debug_hooks do_nothing_debug_hooks; diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 7c93074..320d367 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -2433,7 +2433,7 @@ static void dwarf2out_imported_module_or_decl (tree, tree, tree, bool); static void dwarf2out_imported_module_or_decl_1 (tree, tree, tree, dw_die_ref); static void dwarf2out_abstract_function (tree); -static void dwarf2out_var_location (rtx); +static void dwarf2out_var_location (rtx_insn *); static void dwarf2out_begin_function (tree); static void dwarf2out_end_function (unsigned int); static void dwarf2out_set_name (tree, tree); @@ -2473,7 +2473,7 @@ const struct gcc_debug_hooks dwarf2_debug_hooks = emitting the abstract description of inline functions until something tries to reference them. */ dwarf2out_abstract_function, /* outlining_inline_function */ - debug_nothing_rtx, /* label */ + debug_nothing_rtx_code_label, /* label */ debug_nothing_int, /* handle_pch */ dwarf2out_var_location, dwarf2out_switch_text_section, @@ -21305,7 +21305,7 @@ static unsigned int first_loclabel_num_not_at_text_label; our lookup table. */ static void -dwarf2out_var_location (rtx loc_note) +dwarf2out_var_location (rtx_insn *loc_note) { char loclabel[MAX_ARTIFICIAL_LABEL_BYTES + 2]; struct var_loc_node *newloc; diff --git a/gcc/final.c b/gcc/final.c index 3a78aad..1ae2c90 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2343,7 +2343,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED, case NOTE_INSN_VAR_LOCATION: case NOTE_INSN_CALL_ARG_LOCATION: if (!DECL_IGNORED_P (current_function_decl)) - debug_hooks->var_location (insn); + debug_hooks->var_location (as_a (insn)); break; default: @@ -2381,7 +2381,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED, CC_STATUS_INIT; if (!DECL_IGNORED_P (current_function_decl) && LABEL_NAME (insn)) - debug_hooks->label (insn); + debug_hooks->label (as_a (insn)); app_disable (); @@ -2984,7 +2984,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED, assemble_external (t); } if (!DECL_IGNORED_P (current_function_decl)) - debug_hooks->var_location (insn); + debug_hooks->var_location (as_a (insn)); } /* Output assembler code from the template. */ diff --git a/gcc/sdbout.c b/gcc/sdbout.c index b07824b..583c08a 100644 --- a/gcc/sdbout.c +++ b/gcc/sdbout.c @@ -125,7 +125,7 @@ static void sdbout_end_prologue (unsigned int, const char *); static void sdbout_begin_function (tree); static void sdbout_end_function (unsigned int); static void sdbout_toplevel_data (tree); -static void sdbout_label (rtx); +static void sdbout_label (rtx_code_label *); static char *gen_fake_label (void); static int plain_type (tree); static int template_name_p (tree); @@ -302,7 +302,7 @@ const struct gcc_debug_hooks sdb_debug_hooks = debug_nothing_tree, /* outlining_inline_function */ sdbout_label, /* label */ debug_nothing_int, /* handle_pch */ - debug_nothing_rtx, /* var_location */ + debug_nothing_rtx_insn, /* var_location */ debug_nothing_void, /* switch_text_section */ debug_nothing_tree_tree, /* set_name */ 0, /* start_end_main_source_file */ @@ -1597,7 +1597,7 @@ sdbout_end_epilogue (unsigned int line ATTRIBUTE_UNUSED, is present. */ static void -sdbout_label (rtx insn) +sdbout_label (rtx_code_label *insn) { PUT_SDB_DEF (LABEL_NAME (insn)); PUT_SDB_VAL (insn); diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c index 3ee44bf..463a418 100644 --- a/gcc/vmsdbgout.c +++ b/gcc/vmsdbgout.c @@ -193,9 +193,9 @@ const struct gcc_debug_hooks vmsdbg_debug_hooks debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */ debug_nothing_tree, /* deferred_inline_function */ vmsdbgout_abstract_function, - debug_nothing_rtx, /* label */ + debug_nothing_rtx_code_label, /* label */ debug_nothing_int, /* handle_pch */ - debug_nothing_rtx, /* var_location */ + debug_nothing_rtx_insn, /* var_location */ debug_nothing_void, /* switch_text_section */ debug_nothing_tree_tree, /* set_name */ 0, /* start_end_main_source_file */ -- 1.8.5.3