From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6780 invoked by alias); 6 Aug 2014 17:20:57 -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 5494 invoked by uid 89); 6 Aug 2014 17:20:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_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; Wed, 06 Aug 2014 17:20:44 +0000 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 s76HKfOM006027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 6 Aug 2014 13:20:42 -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 s76HJ2qQ030913; Wed, 6 Aug 2014 13:20:41 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH 170/236] Eliminate BB_NOTE_LIST scaffolding Date: Wed, 06 Aug 2014 17:21:00 -0000 Message-Id: <1407345815-14551-171-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-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00543.txt.bz2 gcc/ * sel-sched-ir.h (struct sel_region_bb_info_def): Strengthen field "note_list" from rtx to rtx_insn *. (BB_NOTE_LIST): Replace this function and... (SET_BB_NOTE_LIST): ...this function with... (BB_NOTE_LIST): ...the former macro implementation. * sched-int.h (concat_note_lists): Strengthen param "from_end" and local "from_start" from rtx to rtx_insn *. Strengthen param "to_endp" from rtx * to rtx_insn **. * haifa-sched.c (concat_note_lists): Likewise. * sel-sched-ir.c (init_bb): Eliminate SET_BB_NOTE_LIST in favor of BB_NOTE_LIST. (sel_restore_notes): Likewise. (move_bb_info): Likewise. (BB_NOTE_LIST): Delete this function. (SET_BB_NOTE_LIST): Delete this function. * sel-sched.c (create_block_for_bookkeeping): Eliminate SET_BB_NOTE_LIST in favor of BB_NOTE_LIST. / * rtx-classes-status.txt: Remove SET_BB_NOTE_LIST. --- gcc/haifa-sched.c | 4 ++-- gcc/sched-int.h | 2 +- gcc/sel-sched-ir.c | 19 ++++--------------- gcc/sel-sched-ir.h | 5 ++--- gcc/sel-sched.c | 4 ++-- rtx-classes-status.txt | 1 - 6 files changed, 11 insertions(+), 24 deletions(-) diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 256c198..132d9a2 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -3953,9 +3953,9 @@ schedule_insn (rtx_insn *insn) /* Add note list that ends on FROM_END to the end of TO_ENDP. */ void -concat_note_lists (rtx from_end, rtx *to_endp) +concat_note_lists (rtx_insn *from_end, rtx_insn **to_endp) { - rtx from_start; + rtx_insn *from_start; /* It's easy when have nothing to concat. */ if (from_end == NULL) diff --git a/gcc/sched-int.h b/gcc/sched-int.h index 2e52722..9f2a3e4 100644 --- a/gcc/sched-int.h +++ b/gcc/sched-int.h @@ -1370,7 +1370,7 @@ extern int sched_speculate_insn (rtx, ds_t, rtx *); extern void unlink_bb_notes (basic_block, basic_block); extern void add_block (basic_block, basic_block); extern rtx_note *bb_note (basic_block); -extern void concat_note_lists (rtx, rtx *); +extern void concat_note_lists (rtx_insn *, rtx_insn **); extern rtx_insn *sched_emit_insn (rtx); extern rtx get_ready_element (int); extern int number_in_ready (void); diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 5d4c12c..8493481 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -4628,7 +4628,7 @@ static void init_bb (basic_block bb) { remove_notes (bb_note (bb), BB_END (bb)); - SET_BB_NOTE_LIST (bb) = note_list; + BB_NOTE_LIST (bb) = note_list; } void @@ -4663,7 +4663,7 @@ sel_restore_notes (void) { note_list = BB_NOTE_LIST (first); restore_other_notes (NULL, first); - SET_BB_NOTE_LIST (first) = NULL_RTX; + BB_NOTE_LIST (first) = NULL; FOR_BB_INSNS (first, insn) if (NONDEBUG_INSN_P (insn)) @@ -5271,8 +5271,8 @@ move_bb_info (basic_block merge_bb, basic_block empty_bb) { if (in_current_region_p (merge_bb)) concat_note_lists (BB_NOTE_LIST (empty_bb), - &SET_BB_NOTE_LIST (merge_bb)); - SET_BB_NOTE_LIST (empty_bb) = NULL_RTX; + &BB_NOTE_LIST (merge_bb)); + BB_NOTE_LIST (empty_bb) = NULL; } @@ -6461,17 +6461,6 @@ rtx& SET_VINSN_INSN_RTX (vinsn_t vi) return vi->insn_rtx; } -rtx_insn *BB_NOTE_LIST (basic_block bb) -{ - rtx note_list = SEL_REGION_BB_INFO (bb)->note_list; - return as_a_nullable (note_list); -} - -rtx& SET_BB_NOTE_LIST (basic_block bb) -{ - return SEL_REGION_BB_INFO (bb)->note_list; -} - rtx_insn *BND_TO (bnd_t bnd) { return as_a_nullable (bnd->to); diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h index d2bf7e2..2af7f03 100644 --- a/gcc/sel-sched-ir.h +++ b/gcc/sel-sched-ir.h @@ -898,7 +898,7 @@ struct sel_region_bb_info_def { /* This insn stream is constructed in such a way that it should be traversed by PREV_INSN field - (*not* NEXT_INSN). */ - rtx note_list; + rtx_insn *note_list; /* Cached availability set at the beginning of a block. See also AV_LEVEL () for conditions when this av_set can be used. */ @@ -921,8 +921,7 @@ extern vec sel_region_bb_info; A note_list is a list of various notes that was scattered across BB before scheduling, and will be appended at the beginning of BB after scheduling is finished. */ -extern rtx_insn *BB_NOTE_LIST (basic_block); -extern rtx& SET_BB_NOTE_LIST (basic_block); +#define BB_NOTE_LIST(BB) (SEL_REGION_BB_INFO (BB)->note_list) #define BB_AV_SET(BB) (SEL_REGION_BB_INFO (BB)->av_set) #define BB_AV_LEVEL(BB) (SEL_REGION_BB_INFO (BB)->av_level) diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index fe82a78..9cd23ef 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -4593,8 +4593,8 @@ create_block_for_bookkeeping (edge e1, edge e2) /* Move note_list from the upper bb. */ gcc_assert (BB_NOTE_LIST (new_bb) == NULL_RTX); - SET_BB_NOTE_LIST (new_bb) = BB_NOTE_LIST (bb); - SET_BB_NOTE_LIST (bb) = NULL_RTX; + BB_NOTE_LIST (new_bb) = BB_NOTE_LIST (bb); + BB_NOTE_LIST (bb) = NULL; gcc_assert (e2->dest == bb); diff --git a/rtx-classes-status.txt b/rtx-classes-status.txt index d26dd89..84d53ba 100644 --- a/rtx-classes-status.txt +++ b/rtx-classes-status.txt @@ -12,7 +12,6 @@ TODO: "Scaffolding" to be removed ================================= * DF_REF_INSN * SET_BB_HEAD, SET_BB_END, SET_BB_HEADER -* SET_BB_NOTE_LIST * SET_BND_TO * SET_DEP_PRO, SET_DEP_CON * SET_NEXT_INSN, SET_PREV_INSN -- 1.8.5.3