From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23024 invoked by alias); 26 Aug 2014 15:54:58 -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 22903 invoked by uid 89); 26 Aug 2014 15:54:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 26 Aug 2014 15:54:55 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7QFsr6H006194 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 26 Aug 2014 11:54:54 -0400 Received: from c64.redhat.com (vpn-226-49.phx2.redhat.com [10.3.226.49]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7QFsoUl026101; Tue, 26 Aug 2014 11:54:52 -0400 From: David Malcolm To: Jeff Law Cc: Richard Henderson , gcc-patches@gcc.gnu.org, David Malcolm Subject: [PATCH 2/3] Convert forced_labels from an EXPR_LIST to an INSN_LIST Date: Tue, 26 Aug 2014 15:54:00 -0000 Message-Id: <1409068812-3313-3-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1409068812-3313-1-git-send-email-dmalcolm@redhat.com> References: <53FB4691.1080501@redhat.com> <1409068812-3313-1-git-send-email-dmalcolm@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg02412.txt.bz2 gcc/ * function.h (struct expr_status): Convert field "x_forced_labels" from rtx_expr_list * to rtx_insn_list *. * cfgbuild.c (make_edges): Convert local "x" from an rtx_expr_list * to an rtx_insn_list *, replacing use of "element" method with "insn" method. * dwarf2cfi.c (create_trace_edges): Likewise for local "lab". * except.c (sjlj_emit_dispatch_table): Replace use of gen_rtx_EXPR_LIST with gen_rtx_INSN_LIST when prepending to forced_labels. * jump.c (rebuild_jump_labels_1): Convert local "insn" from an rtx_expr_list * to an rtx_insn_list *, replacing use of "element" method with "insn" method. * reload1.c (set_initial_label_offsets): Likewise for local "x". * stmt.c (label_rtx): Strengthen local "ref" from rtx to rtx_insn *, adding a checked cast. Replace use of gen_rtx_EXPR_LIST with gen_rtx_INSN_LIST when prepending it to forced_labels. (expand_label): Likewise for local "label_r". --- gcc/cfgbuild.c | 4 ++-- gcc/dwarf2cfi.c | 4 ++-- gcc/except.c | 2 +- gcc/function.h | 2 +- gcc/jump.c | 6 +++--- gcc/reload1.c | 6 +++--- gcc/stmt.c | 8 ++++---- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index d7fa97a..475739d 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -284,8 +284,8 @@ make_edges (basic_block min, basic_block max, int update_p) everything on the forced_labels list. */ else if (computed_jump_p (insn)) { - for (rtx_expr_list *x = forced_labels; x; x = x->next ()) - make_label_edge (edge_cache, bb, x->element (), EDGE_ABNORMAL); + for (rtx_insn_list *x = forced_labels; x; x = x->next ()) + make_label_edge (edge_cache, bb, x->insn (), EDGE_ABNORMAL); } /* Returns create an exit out. */ diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 7c495e4..8b00b1e 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -2309,8 +2309,8 @@ create_trace_edges (rtx insn) } else if (computed_jump_p (insn)) { - for (rtx_expr_list *lab = forced_labels; lab; lab = lab->next ()) - maybe_record_trace_start (lab->element (), insn); + for (rtx_insn_list *lab = forced_labels; lab; lab = lab->next ()) + maybe_record_trace_start (lab->insn (), insn); } else if (returnjump_p (insn)) ; diff --git a/gcc/except.c b/gcc/except.c index 05da989..99a66a0 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1310,7 +1310,7 @@ sjlj_emit_dispatch_table (rtx_code_label *dispatch_label, int num_dispatch) CFG edges more exactly, we can use the forced_labels list instead. */ LABEL_PRESERVE_P (dispatch_label) = 1; forced_labels - = gen_rtx_EXPR_LIST (VOIDmode, dispatch_label, forced_labels); + = gen_rtx_INSN_LIST (VOIDmode, dispatch_label, forced_labels); #endif /* Load up exc_ptr and filter values from the function context. */ diff --git a/gcc/function.h b/gcc/function.h index 3921d21..071f5dd 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -135,7 +135,7 @@ struct GTY(()) expr_status { rtx x_apply_args_value; /* List of labels that must never be deleted. */ - rtx_expr_list *x_forced_labels; + rtx_insn_list *x_forced_labels; }; typedef struct call_site_record_d *call_site_record; diff --git a/gcc/jump.c b/gcc/jump.c index b8d3d52..3529ed6 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -74,7 +74,7 @@ static int returnjump_p_1 (rtx *, void *); static void rebuild_jump_labels_1 (rtx_insn *f, bool count_forced) { - rtx_expr_list *insn; + rtx_insn_list *insn; timevar_push (TV_REBUILD_JUMP); init_label_info (f); @@ -86,8 +86,8 @@ rebuild_jump_labels_1 (rtx_insn *f, bool count_forced) if (count_forced) for (insn = forced_labels; insn; insn = insn->next ()) - if (LABEL_P (insn->element ())) - LABEL_NUSES (insn->element ())++; + if (LABEL_P (insn->insn ())) + LABEL_NUSES (insn->insn ())++; timevar_pop (TV_REBUILD_JUMP); } diff --git a/gcc/reload1.c b/gcc/reload1.c index 419940e..77ec6ac 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -3911,9 +3911,9 @@ set_initial_label_offsets (void) { memset (offsets_known_at, 0, num_labels); - for (rtx_expr_list *x = forced_labels; x; x = x->next ()) - if (x->element ()) - set_label_offsets (x->element (), NULL, 1); + for (rtx_insn_list *x = forced_labels; x; x = x->next ()) + if (x->insn ()) + set_label_offsets (x->insn (), NULL, 1); for (rtx_insn_list *x = nonlocal_goto_handler_labels; x; x = x->next ()) if (x->insn ()) diff --git a/gcc/stmt.c b/gcc/stmt.c index 1cbd63d..70dad0c 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -141,12 +141,12 @@ label_rtx (tree label) rtx force_label_rtx (tree label) { - rtx ref = label_rtx (label); + rtx_insn *ref = as_a (label_rtx (label)); tree function = decl_function_context (label); gcc_assert (function); - forced_labels = gen_rtx_EXPR_LIST (VOIDmode, ref, forced_labels); + forced_labels = gen_rtx_INSN_LIST (VOIDmode, ref, forced_labels); return ref; } @@ -176,7 +176,7 @@ emit_jump (rtx label) void expand_label (tree label) { - rtx label_r = label_rtx (label); + rtx_insn *label_r = as_a (label_rtx (label)); do_pending_stack_adjust (); emit_label (label_r); @@ -192,7 +192,7 @@ expand_label (tree label) } if (FORCED_LABEL (label)) - forced_labels = gen_rtx_EXPR_LIST (VOIDmode, label_r, forced_labels); + forced_labels = gen_rtx_INSN_LIST (VOIDmode, label_r, forced_labels); if (DECL_NONLOCAL (label) || FORCED_LABEL (label)) maybe_set_first_label_num (label_r); -- 1.8.5.3