This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 008/236] Split BB_HEAD et al into BB_HEAD/SET_BB_HEAD variants
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Aug 2014 16:48:49 -0400
- Subject: Re: [PATCH 008/236] Split BB_HEAD et al into BB_HEAD/SET_BB_HEAD variants
- Authentication-results: sourceware.org; auth=none
- References: <1407345815-14551-1-git-send-email-dmalcolm at redhat dot com> <1407345815-14551-9-git-send-email-dmalcolm at redhat dot com> <53EA83EA dot 5050408 at redhat dot com>
On Tue, 2014-08-12 at 15:15 -0600, Jeff Law wrote:
> On 08/06/14 11:19, David Malcolm wrote:
> > This is an enabling patch, splitting existing macros in two, covering
> > the rvalue and lvalue uses separately.
> >
> > Followup patches will replace these with functions, and gradually convert
> > the types from rtx to rtx_insn *, but we need to do this separately for
> > the lvalue vs rvalue use-cases, hence this patch.
> >
> > The plan is to eventually eliminate the split in a further followup patch,
> > and convert them back to macros, where the underlying fields are of type
> > rtx_insn *.
> >
> > gcc/
> > * basic-block.h (BB_HEAD): Split macro in two: the existing one,
> > for rvalues, and...
> > (SET_BB_HEAD): New macro, for use as a lvalue.
> > (BB_END, SET_BB_END): Likewise.
> > (BB_HEADER, SET_BB_HEADER): Likewise.
> > (BB_FOOTER, SET_BB_FOOTER): Likewise.
> >
> > * bb-reorder.c (add_labels_and_missing_jumps): Convert lvalue use
> > of BB_* macros into SET_BB_* macros.
> > (fix_crossing_unconditional_branches): Likewise.
> > * caller-save.c (save_call_clobbered_regs): Likewise.
> > (insert_one_insn): Likewise.
> > * cfgbuild.c (find_bb_boundaries): Likewise.
> > * cfgcleanup.c (merge_blocks_move_successor_nojumps): Likewise.
> > (outgoing_edges_match): Likewise.
> > (try_optimize_cfg): Likewise.
> > * cfgexpand.c (expand_gimple_cond): Likewise.
> > (expand_gimple_tailcall): Likewise.
> > (expand_gimple_basic_block): Likewise.
> > (construct_exit_block): Likewise.
> > * cfgrtl.c (delete_insn): Likewise.
> > (create_basic_block_structure): Likewise.
> > (rtl_delete_block): Likewise.
> > (rtl_split_block): Likewise.
> > (emit_nop_for_unique_locus_between): Likewise.
> > (rtl_merge_blocks): Likewise.
> > (block_label): Likewise.
> > (try_redirect_by_replacing_jump): Likewise.
> > (emit_barrier_after_bb): Likewise.
> > (fixup_abnormal_edges): Likewise.
> > (record_effective_endpoints): Likewise.
> > (relink_block_chain): Likewise.
> > (fixup_reorder_chain): Likewise.
> > (fixup_fallthru_exit_predecessor): Likewise.
> > (cfg_layout_duplicate_bb): Likewise.
> > (cfg_layout_split_block): Likewise.
> > (cfg_layout_delete_block): Likewise.
> > (cfg_layout_merge_blocks): Likewise.
> > * combine.c (update_cfg_for_uncondjump): Likewise.
> > * emit-rtl.c (add_insn_after): Likewise.
> > (remove_insn): Likewise.
> > (reorder_insns): Likewise.
> > (emit_insn_after_1): Likewise.
> > * haifa-sched.c (get_ebb_head_tail): Likewise.
> > (restore_other_notes): Likewise.
> > (move_insn): Likewise.
> > (sched_extend_bb): Likewise.
> > (fix_jump_move): Likewise.
> > * ifcvt.c (noce_process_if_block): Likewise.
> > (dead_or_predicable): Likewise.
> > * ira.c (update_equiv_regs): Likewise.
> > * reg-stack.c (change_stack): Likewise.
> > * sel-sched-ir.c (sel_move_insn): Likewise.
> > * sel-sched.c (move_nop_to_previous_block): Likewise.
> >
> > * config/c6x/c6x.c (hwloop_optimize): Likewise.
> > * config/ia64/ia64.c (emit_predicate_relation_info): Likewise.
> >
> > /
> > * rtx-classes-status.txt (TODO): Add SET_BB_HEAD, SET_BB_END,
> > SET_BB_HEADER, SET_BB_FOOTER
> OK. For those watching at home, the scaffolding gets removed in patches
> 170 and 178 and we return to using BB_HEAD, BB_END, etc without a
> separate one for rvalues vs lvalues.
>
> Obviously as the bits stage in there may be a window where folks will
> have to deal with the split, but hopefully that window will be quite
> short. While I'd like to avoid that, I fear we'll have David spinning
> his wheels to get the patch series to a point where it can all go in at
> once.
Thanks; committed to trunk as r214121, having bootstrapped®tested on
x86_64 Fedora 20 (together with patches 2-8 of the kit as per:
https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01420.html )
and verified build of the patch by itself for targets
x86_64-unknown-linux-gnu, c6x-elf and ia64-elf.