[PATCH 164/236] Add rtx_jump_table_data::get_labels method

2014-08-06 Thread David Malcolm
See e.g. stmt.c:emit_case_dispatch_table for how the rtvec is set up. gcc/ * rtl.h (rtx_jump_table_data::get_labels): New method. * cfgbuild.c (make_edges): Replace hand-coded lookup of labels with use of the new rtx_jump_table_data::get_labels method.

Fwd: [GOOGLE, AUTOFDO] Assign different discriminators to calls with the same lineno

2014-08-06 Thread Wei Mi
(Sorry if you received the mail twice because it was not plain text at first and was rejected by @sourceware.org) We saw bb like this in the IR dump after pass_build_cfg: bb 21: [1.cc : 205:45] D.332088 = table-_vptr.Table; [1.cc : 205:45] D.332134 = D.332088 + 104; [1.cc : 205:45]

[PATCH 165/236] struct haifa_sched_info: prev_head and next_tail

2014-08-06 Thread David Malcolm
gcc/ * sched-int.h (struct haifa_sched_info): Strengthen fields prev_head and next_tail from rtx to rtx_insn *. --- gcc/sched-int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/sched-int.h b/gcc/sched-int.h index ae048c1..220e26d 100644 ---

[PATCH 017/236] Add subclasses for the various kinds of instruction

2014-08-06 Thread David Malcolm
gcc/ * coretypes.h (class rtx_real_insn): Add forward declaration. (class rtx_debug_insn): Likewise. (class rtx_nonjump_insn): Likewise. (class rtx_jump_insn): Likewise. (class rtx_call_insn): Likewise. (class rtx_jump_table_data): Likewise.

[PATCH 134/236] config/i386/i386.c: Use rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * config/i386/i386.c (setup_incoming_varargs_64): Strengthen local label from rtx to rtx_code_label *. (ix86_expand_prologue): Likewise. (ix86_expand_split_stack_prologue): Likewise for locals label, varargs_label. (ix86_split_idivmod): Likewise

[PATCH 168/236] final_start_function takes an rtx_insn

2014-08-06 Thread David Malcolm
All in-tree users of final_start_function now pass an rtx_insn * as the first param. gcc/ * output.h (final_start_function): Strengthen param 1 from rtx to rtx_insn *. * final.c (final_start_function): Likewise, renaming back from uncast_first to first, and

[PATCH 121/236] varasm.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * varasm.c (mark_constants): Strengthen param insn from rtx to rtx_insn *. (mark_constant_pool): Likewise for local insn. --- gcc/varasm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/varasm.c b/gcc/varasm.c index 7755717..8c65c1c 100644

[PATCH 108/236] reload: Use rtx_insn (also touches caller-save.c and config/arc/arc)

2014-08-06 Thread David Malcolm
gcc/ * reload.h (struct insn_chain): Strengthen field insn from rtx to rtx_insn *. (find_reloads): Likewise for param 1. (subst_reloads): Likewise for sole param. (find_equiv_reg): Likwise for param 2. (regno_clobbered_p): Likwise for param 2.

[PATCH 082/236] ifcvt.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * ifcvt.c (count_bb_insns): Strengthen local insn from rtx to rtx_insn *. (cheap_bb_rtx_cost_p): Likewise. (first_active_insn): Likewise for return type and local insn. (last_active_insn): Likewise for return type and locals insn, head.

[PATCH 232/236] Use rtx_insn in various places in resource.[ch]

2014-08-06 Thread David Malcolm
After fixing reorg.c's update_block and reorg_redirect_jump, all in-tree users of the given resource.h functions now are rtx_insn *, so we can update the API itself. gcc/ * resource.h (clear_hashed_info_for_insn): Strengthen param from rtx to rtx_insn *.

[PATCH 236/236] END OF PATCHES: Delete rtx-classes-status.txt

2014-08-06 Thread David Malcolm
/ rtx-classes-status.txt: Delete --- rtx-classes-status.txt | 9 - 1 file changed, 9 deletions(-) delete mode 100644 rtx-classes-status.txt diff --git a/rtx-classes-status.txt b/rtx-classes-status.txt deleted file mode 100644 index 020deba..000 --- a/rtx-classes-status.txt

[PATCH 028/236] cfgexpand.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * cfgexpand.c (expand_used_vars): Strengthen return type from rtx to rtx_insn *; also for local var_end_seq. (maybe_dump_rtl_for_gimple_stmt): Likewise for param since. (maybe_cleanup_end_of_block): Likewise for param last and local insn.

[PATCH 025/236] make_insn_raw returns an rtx_insn

2014-08-06 Thread David Malcolm
Doing so means strengthening the types of the make_raw callbacks within emit-rtl.c from rtx to rtx_insn * as used by the emit_pattern_* internal functions. There's more that could be done in terms of the params to these functions, but we'll save that for later. gcc/ * rtl.h

[PATCH 005/236] Introduce as_a_nullable

2014-08-06 Thread David Malcolm
In many circumstances, is_a_helper T::test assumes that the pointer is non-NULL, but sometimes you have a pointer of type T that can be NULL. Earlier versions of this patch kit made numerous uses of the ternary operator to handle nullable pointers e.g.: return insn ? as_a rtx_insn * (insn) :

[PATCH 086/236] jump.c: Use rtx_insn in a few places (also touches rtl.h and cfgexpand.c)

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (rebuild_jump_labels): Strengthen param f from rtx to rtx_insn *. (rebuild_jump_labels_chain): Likewise for param chain. * cfgexpand.c (pass_expand::execute): Add checked cast to rtx_insn * when calling rebuild_jump_labels_chain in region where

[PATCH 157/236] struct eh_landing_pad_d: field landing_pad is an rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * except.h (struct eh_landing_pad_d): Strengthen field landing_pad from rtx to rtx_code_label *. * except.c (sjlj_emit_dispatch_table): Likewise for param dispatch_label (sjlj_build_landing_pads): Likewise for local dispatch_label. --- gcc/except.c |

[PATCH 061/236] combine.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * combine.c (i2mod): Strengthen this variable from rtx to rtx_insn *. (struct reg_stat_struct): Likewise for fields last_death, last_set. (subst_insn): Likewise for this variable. (added_links_insn): Likewise. (struct insn_link): Likewise for field

[PATCH 026/236] bb_note returns a rtx_note *

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (bb_note): Strengthen return type from rtx to rtx_note *. * sched-int.h (bb_note): Likewise. * cfgrtl.c (bb_note): Likewise. Add a checked cast to rtx_note *. --- gcc/basic-block.h | 2 +- gcc/cfgrtl.c | 4 ++-- gcc/sched-int.h | 2 +- 3 files

[PATCH 112/236] sched-ebb.c: Use rtx_insn (requires touching sched-int.h and config/c6x/c6x.c)

2014-08-06 Thread David Malcolm
On c6x, this patch relies on hwloop_info loop_end already being an rtx_insn *, so that schedule_ebb is always called with rtx_insn *. The hunk to change loop_end is within the hw-loop patch, which occurs alphabetically before sched-ebb, so that's OK given an alphabetical ordering of the patches

[PATCH 193/236] cselib (also touches sched-deps.c)

2014-08-06 Thread David Malcolm
gcc/ * cselib.h (struct elt_loc_list): Strengthen field setting_insn from rtx to rtx_insn *. (cselib_lookup_from_insn): Likewise for final param. (cselib_subst_to_values_from_insn): Likewise. (cselib_add_permanent_equiv): Likewise. * cselib.c

[PATCH 067/236] ddg: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * ddg.h (struct ddg_node): Strengthen fields insn and first_note from rtx to rtx_insn *. (get_node_of_insn): Likewise for param 2 insn. (autoinc_var_is_used_p): Likewise for params def_insn and use_insn. * ddg.c (mem_read_insn_p): Strengthen param insn

[PATCH 138/236] config/m68k: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/m68k/m68k-protos.h (output_btst): Strengthen param 4 from rtx to rtx_insn *. (strict_low_part_peephole_ok): Likewise for param 2 first_insn. (m68k_final_prescan_insn): Likewise for first param. * config/m68k/m68k.c (m68k_emit_movem): Likewise

[PATCH 127/236] config/arc: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/arc/arc-protos.h (arc_final_prescan_insn): Strengthen first param from rtx to rtx_insn *. (arc_verify_short): Likewise. (arc_short_long): Likewise. (arc_need_delay): Likewise. * config/arc/arc.c (struct arc_ccfsm): Likewise for field

[PATCH 218/236] Use rtx subclasses in more places in reorg.c

2014-08-06 Thread David Malcolm
Simplify and clarify reorg.c in various ways by using rtx subclasses. For example, make it explicit within the type system that delay lists are INSN_LIST chains. gcc/ * reorg.c (skip_consecutive_labels): Strengthen return type, param and local insn from rtx to rtx_insn *.

[PATCH 181/236] Strengthen fields in struct sequence_stack and struct emit_status

2014-08-06 Thread David Malcolm
gcc/ * function.h (struct sequence_stack): Strengthen fields first and last from rtx to rtx_insn *. (struct emit_status): Likewise for fields x_first_insn and x_last_insn. * emit-rtl.h (get_insns): Remove now-redundant checked cast.

[PATCH 149/236] config/sh: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * config/sh/sh-protos.h (output_ieee_ccmpeq): Strengthen param 1 from rtx to rtx_insn *. (output_branchy_insn): Likewise for param 3. (output_far_jump): Likewise for param 1. (final_prescan_insn): Likewise. (sh_insn_length_adjustment): Likewise

[PATCH 155/236] config/xtensa: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * config/xtensa/xtensa-protos.h (xtensa_emit_loop_end): Strengthen first param from rtx to rtx_insn *. * config/xtensa/xtensa.c (struct machine_function): Likewise for field set_frame_ptr_insn. (xtensa_expand_compare_and_swap): Strengthen locals csloop

[PATCH 199/236] Introduce rtx_insn_list subclass of rtx_def

2014-08-06 Thread David Malcolm
gcc/ * coretypes.h (class rtx_insn_list): Add forward declaration. * rtl.h (class rtx_insn_list): New subclass of rtx_def (is_a_helper rtx_insn_list *::test): New. (rtx_insn_list::next): New. (rtx_insn_list::insn): New. (gen_rtx_INSN_LIST): Add

[PATCH 103/236] reg-stack.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * reg-stack.c (next_flags_user): Strengthen return type and param insn from rtx to rtx_insn *. (straighten_stack): Likewise for param insn. (check_asm_stack_operands): Likewise. (remove_regno_note): Likewise. (emit_pop_insn): Likewise for return

[PATCH 096/236] optabs.c: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * optabs.c (expand_doubleword_shift): Strengthen local insn from rtx to rtx_insn *. (expand_binop): Likewise for locals entry_last, last, insns (expand_twoval_unop): Likewise for locals entry_last, last. (expand_twoval_binop): Likewise.

[PATCH 231/236] Make insn_addresses_new require an rtx_insn

2014-08-06 Thread David Malcolm
This affects the INSN_ADDRESSES_NEW macro, which is defined in terms of insn_addresses_new. gcc/ * insn-addr.h (insn_addresses_new): Strengthen param insn from rtx to rtx_insn *. * config/s390/s390.c (s390_split_branches): Eliminate top-level local rtx tmp, in

[PATCH 143/236] config/pa: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/pa/pa-protos.h (pa_output_call): Strengthen first param from rtx to rtx_insn *. (pa_output_indirect_call): Likewise. (pa_adjust_insn_length): Likewise. (pa_attr_length_millicode_call): Likewise. (pa_attr_length_call): Likewise.

[PATCH 055/236] caller-save.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * caller-save.c (save_call_clobbered_regs): Strengthen locals ins and prev from rtx to rtx_insn *. --- gcc/caller-save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/caller-save.c b/gcc/caller-save.c index b1ef3a9..fd936ba 100644 ---

[PATCH 150/236] config/sparc: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/sparc/sparc-protos.h (output_ubranch): Strengthen param 2 from rtx to rtx_insn *. (output_cbranch): Likewise for param 6. (output_return): Likewise for param 1. (output_sibcall): Likewise. (output_v8plus_shift): Likewise.

[PATCH 141/236] config/mips: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * config/mips/mips-protos.h (mips_emit_move): Strengthen return type from rtx to rtx_insn *. (mips_expand_call): Likewise. (mips_adjust_insn_length): Likewise for first param. (mips_output_conditional_branch): Likewise.

[PATCH 169/236] Strengthen haifa_sched_info callbacks and 3 scheduler hooks

2014-08-06 Thread David Malcolm
gcc/ * target.def (reorder): Strengthen param ready of this DEFHOOK from rtx * to rtx_insn **. (reorder2): Likewise. (dependencies_evaluation_hook): Strengthen params head, tail from rtx to rtx_insn *. * doc/tm.texi: Update mechanically for above

[PATCH 085/236] ira: Use rtx_insn in various places

2014-08-06 Thread David Malcolm
gcc/ * ira-int.h (struct ira_allocno_copy): Strengthen field insn from rtx to rtx_insn *insn. (ira_create_copy): Strengthen param insn from rtx to rtx_insn *. (ira_add_allocno_copy): Likewise. * ira-build.c (find_allocno_copy): Strengthen param insn from

[PATCH 016/236] BND_TO scaffolding

2014-08-06 Thread David Malcolm
gcc/ * sel-sched-ir.h (BND_TO): insn_t will eventually be an rtx_insn *. To help with transition, for now, convert from an access macro into a pair of functions: BND_TO, returning an rtx_insn *, and... (SET_BND_TO): New function, for use where BND_TO is

[PATCH 074/236] expr.c: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * expr.c (convert_move): Strengthen local insns from rtx to rtx_insn *. (emit_block_move_via_loop): Strengthen locals cmp_label and top_label from rtx to rtx_code_label *. (move_block_to_reg): Strengthen local insn, last from rtx to rtx_insn *.

[PATCH 178/236] Remove BB_HEAD, BB_END, BB_HEADER scaffolding

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (struct rtl_bb_info): Strengthen fields end_ and header_ from rtx to rtx_insn *. (struct basic_block_d): Likewise for field head_ within x field of union basic_block_il_dependent. (BB_HEAD): Drop function... (SET_BB_HEAD): ...and

[PATCH 065/236] cse.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * cse.c (struct qty_table_elem): Strengthen field const_insn from rtx to rtx_insn *. (struct change_cc_mode_args): Likewise for field insn. (this_insn): Strengthen from rtx to rtx_insn *. (make_new_qty): Replace use of NULL_RTX with NULL when dealing

[PATCH 076/236] function.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * function.c (emit_initial_value_sets): Strengthen local seq from rtx to rtx_insn *. (instantiate_virtual_regs_in_insn): Likewise for param insn and local seq. (instantiate_virtual_regs): Likewise for local insn. (assign_parm_setup_reg):

[PATCH 122/236] var-tracking.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * var-tracking.c (struct micro_operation_def): Strengthen field insn from rtx to rtx_insn *. (struct emit_note_data_def): Likewise. (insn_stack_adjust_offset_pre_post): Likewise for param insn. (vt_stack_adjustments): Likewise for local insn.

[PATCH 114/236] sel-sched.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * sel-sched.c (substitute_reg_in_expr): Strengthen local new_insn from rtx to rtx_insn *. (create_insn_rtx_with_rhs): Likewise for return type and for local insn_rtx. (create_insn_rtx_with_lhs): Likewise. (create_speculation_check): Likewise for

[PATCH 146/236] config/rx: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/rx/rx-protos.h (rx_adjust_insn_length): Strengthen first param from rtx to rtx_insn *. * config/rx/rx.c (rx_adjust_insn_length): Likewise for param insn. --- gcc/config/rx/rx-protos.h | 2 +- gcc/config/rx/rx.c| 2 +- 2 files changed, 2 insertions(+),

[PATCH 136/236] config/ia64/ia64.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/ia64/ia64.c (ia64_expand_tls_address): Strengthen local insns from rtx to rtx_insn *. (ia64_emit_cond_move): Likewise for locals insn, first. (struct spill_fill_data): Likewise for field init_after and for elements of array field prev_insn.

[PATCH 117/236] stack-ptr-mod.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * stack-ptr-mod.c (pass_stack_ptr_mod::execute): Strengthen local insn from rtx to rtx_insn *. --- gcc/stack-ptr-mod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/stack-ptr-mod.c b/gcc/stack-ptr-mod.c index 75bec2f..a16369f 100644 ---

[PATCH 204/236] final.c: Use rtx_sequence

2014-08-06 Thread David Malcolm
gcc/ * final.c (get_attr_length_1): Replace GET_CODE check with a dyn_cast, introducing local seq and the use of methods of rtx_sequence. (shorten_branches): Likewise, introducing local body_seq. Strengthen local inner_insn from rtx to rtx_insn *.

[PATCH 036/236] get_last_bb_insn returns an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (get_last_bb_insn): Strengthen return type from rtx to rtx_insn *. * cfgrtl.c (get_last_bb_insn): Likewise, and for locals tmp and end. --- gcc/basic-block.h | 2 +- gcc/cfgrtl.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH 010/236] Split NEXT_INSN/PREV_INSN into lvalue and rvalue forms

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (PREV_INSN): Split macro in two: the existing one, for rvalues, and... (SET_PREV_INSN): New macro, for use as an lvalue. (NEXT_INSN, SET_NEXT_INSN): Likewise. * caller-save.c (save_call_clobbered_regs): Convert lvalue use of

[PATCH 234/236] Strengthen params to active_insn_between

2014-08-06 Thread David Malcolm
gcc/ * shrink-wrap.h (active_insn_between): Strengthen both params from rtx to rtx_insn *. * function.c (active_insn_between): Likewise. --- gcc/function.c| 3 +-- gcc/shrink-wrap.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/function.c

[PATCH 124/236] PHASE 3: Per-config subdir commits

2014-08-06 Thread David Malcolm
/ * rtx-classes-status.txt: Update --- rtx-classes-status.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtx-classes-status.txt b/rtx-classes-status.txt index e350eaf..b22cb1e 100644 --- a/rtx-classes-status.txt +++ b/rtx-classes-status.txt @@ -2,8 +2,8 @@

[PATCH 207/236] reorg.c: Use rtx_sequence

2014-08-06 Thread David Malcolm
gcc/ * reorg.c (redundant_insn): In two places in the function, replace a check of GET_CODE with a dyn_cast, introducing local seq, and usings methods of rtx_sequence to clarify the code. --- gcc/reorg.c | 24 1 file changed, 12 insertions(+), 12

[PATCH 023/236] delete_trivially_dead_insns works on insns

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (delete_trivially_dead_insns): Strengthen initial param insns from rtx to rtx_insn *. * cse.c (delete_trivially_dead_insns): Likewise, also do it for locals insn and prev. --- gcc/cse.c | 4 ++-- gcc/rtl.h | 2 +- 2 files changed, 3 insertions(+), 3

[PATCH 195/236] Convert PATTERN from a macro to a pair of inline functions

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (PATTERN): Convert this macro into a pair of inline functions, for now, requiring const_rtx and rtx. --- gcc/rtl.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/rtl.h b/gcc/rtl.h index 79cca1b..640616f 100644 --- a/gcc/rtl.h +++

[PATCH 029/236] rtl_data.x_parm_birth_insn is an insn

2014-08-06 Thread David Malcolm
gcc/ * function.h (struct rtl_data): Strengthen field x_parm_birth_insn from rtx to rtx_insn *. * function.c (struct assign_parm_data_all): Strengthen fields first_conversion_insn and last_conversion_insn from rtx to rtx_insn *. --- gcc/function.c | 4 ++--

[PATCH 045/236] define_bypass guard functions take a pair of rtx_insn

2014-08-06 Thread David Malcolm
(define_bypass) clauses in .md files can specify the name of a guard function as their final operand. Currently these functions are called with a pair of rtx. This patch strengthens insn-automata.c so that such guard functions are passed a pair of rtx_insn *, allowing these guard functions to be

[PATCH 211/236] Introduce rtx_expr_list subclass of rtx_def

2014-08-06 Thread David Malcolm
gcc/ * coretypes.h (class rtx_expr_list): Add forward declaration. * emit-rtl.c (gen_rtx_EXPR_LIST): New. * gengenrtl.c (special_rtx): Add EXPR_LIST. * rtl.h (class rtx_expr_list): New subclass of rtx_def, adding invariant: GET_CODE (X) == EXPR_LIST.

[PATCH 088/236] loop-invariant.c: Use rtx_insn in various places

2014-08-06 Thread David Malcolm
gcc/ * loop-invariant.c (struct use): Strengthen field insn from rtx to rtx_insn *. (struct invariant): Likewise. (hash_invariant_expr_1): Likewise for param insn. (invariant_expr_equal_p): Likewise for param insn1, insn2. (find_exits): Likewise for

[PATCH 179/236] cselib_record_sets_hook takes an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * cselib.h (cselib_record_sets_hook): Strengthen initial param insn from rtx to rtx_insn *. * cselib.c (cselib_record_sets_hook): Likewise. * var-tracking.c (add_with_sets): Likewise, renaming back from uncast_insn to insn and eliminating the checked

[PATCH 128/236] config/arm: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * config/arm/arm-protos.h (arm_final_prescan_insn): Likewise for param. (thumb1_final_prescan_insn): Likewise. (thumb2_final_prescan_insn): Likewise. * config/arm/arm.c (emit_set_insn): Strengthen return type from rtx to rtx_insn *. (struct

[PATCH 015/236] BB_NOTE_LIST scaffolding

2014-08-06 Thread David Malcolm
gcc/ * sel-sched-ir.h (BB_NOTE_LIST): struct sel_region_bb_info_def's note_list field will eventually be an rtx_insn *. To help with transition, for now, convert from an access macro into a pair of functions: BB_NOTE_LIST, returning an rtx_insn *, and...

[PATCH 044/236] Pass insn as an rtx_insn within generated get_attr_ fns in insn-attrtab.c

2014-08-06 Thread David Malcolm
Strengthen insn from rtx to rtx_insn * within the generated get_attr_ functions in insn-attrtab.c, without imposing a strengthening from rtx to rtx_insn * on the param itself and thus the callers. gcc/ * genattrtab.c (write_attr_get): Within the generated get_attr_ functions,

[PATCH 133/236] config/h8300: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/h8300/h8300-protos.h (final_prescan_insn): Strengthen first param from rtx to rtx_insn *. (h8300_insn_length_from_table): Likewise. * config/h8300/h8300.c (F): Likewise for return type and param x. (Fpa): Add a checked cast to rtx_insn

[PATCH 081/236] hw-doloop: Use rtx_insn (touches config/bfin/bfin.c)

2014-08-06 Thread David Malcolm
gcc/ * hw-doloop.h (struct hwloop_info_d): Strengthen fields last_insn, loop_end from rtx to rtx_insn *. * hw-doloop.c (scan_loop): Likewise for local insn. (discover_loop): Likewise for param tail_insn. (discover_loops): Likewise for local tail. *

[PATCH 069/236] dwarf2cfi.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * dwarf2cfi.c (add_cfis_to_fde): Strengthen locals insn, next from rtx to rtx_insn *. create_pseudo_cfg): Likewise for local insn. --- gcc/dwarf2cfi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index

[PATCH 214/236] rtl_data.x_stack_slot_list becomes an rtx_expr_list

2014-08-06 Thread David Malcolm
gcc/ * function.h (struct rtl_data): Strengthen field x_stack_slot_list from rtx to rtx_expr_list *. * emit-rtl.c (unshare_all_rtl_1): Add a checked cast when assigning to stack_slot_list. --- gcc/emit-rtl.c | 3 ++- gcc/function.h | 2 +- 2 files changed, 3

[PATCH 035/236] Return types of unlink_insn_chain and duplicate_insn_chain

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (unlink_insn_chain): Strengthen return type from rtx to rtx_insn *. (duplicate_insn_chain): Likewise. * cfgrtl.c (unlink_insn_chain): Strengthen return type from rtx to rtx_insn *, also for locals prevfirst and nextlast. Add a checked

[PATCH 041/236] Debug hooks: use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
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.

[PATCH 070/236] dwarf2out.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * dwarf2out.c (last_var_location_insn): Strengthen this variable from rtx to rtx_insn *. (cached_next_real_insn): Likewise. (dwarf2out_end_epilogue): Replace use of NULL_RTX with NULL when working with insns. (dwarf2out_var_location): Strengthen

[PATCH 131/236] config/c6x: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/c6x/c6x-protos.h (c6x_get_unit_specifier): Strengthen param from rtx to rtx_insn *. (c6x_final_prescan_insn): Likewise for first param. * config/c6x/c6x.c (c6x_current_insn): Likewise for this variable. (c6x_output_mi_thunk): Replace use of

[PATCH 071/236] except.*: Use rtx_insn (also touches function.h)

2014-08-06 Thread David Malcolm
gcc/ * except.h (sjlj_emit_function_exit_after): Strengthen param after from rtx to rtx_insn *. This is only called with result of get_last_insn (in function.c) so type-change should be self-contained. * function.h (struct rtl_eh): Strengthen field

[PATCH 221/236] Add insn method to rtx_expr_list

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (rtx_expr_list::insn): New method. --- gcc/rtl.h | 9 + 1 file changed, 9 insertions(+) diff --git a/gcc/rtl.h b/gcc/rtl.h index d028be1..d5811c2 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -414,6 +414,10 @@ public: /* Get at the underlying rtx. */ rtx element

[PATCH 024/236] last_call_insn returns an rtx_call_insn *

2014-08-06 Thread David Malcolm
gcc/ * emit-rtl.c (last_call_insn): Strengthen return type from rtx to rtx_call_insn *. * rtl.h (is_a_helper rtx_call_insn *::test): New overload, accepting an rtx_insn *. (last_call_insn): Strengthen return type from rtx to rtx_call_insn *. ---

[PATCH 235/236] Make next_insn and previous_insn require an rtx_insn *

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (previous_insn): Strengthen param from rtx to rtx_insn *. (next_insn): Likewise. * emit-rtl.c (next_insn): Likewise. (previous_insn): Likewise. * config/pa/pa.c (remove_useless_addtr_insns): Strenghten locals insn and next from rtx to

[PATCH 216/236] PHASE 6: Use extra rtx_def subclasses

2014-08-06 Thread David Malcolm
/ rtx-classes-status.txt: Update --- rtx-classes-status.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtx-classes-status.txt b/rtx-classes-status.txt index e51b0f3..abd5c7f 100644 --- a/rtx-classes-status.txt +++ b/rtx-classes-status.txt @@ -5,8 +5,8 @@ Phase

[PATCH 115/236] sel-sched-ir.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * sel-sched-ir.c (vinsn_copy): Strengthen local copy from rtx to rtx_insn *. (speculate_expr): Likewise for locals orig_insn_rtx, spec_insn_rtx. (eq_transformed_insns): Likewise for locals i1, i2. (check_for_new_jump): Likewise for return type

[PATCH 184/236] Use rtx_insn in more places in sel-sched.c

2014-08-06 Thread David Malcolm
gcc/ * sel-sched.c (find_place_for_bookkeeping): Strengthen local insn from rtx to rtx_insn *. (need_nop_to_preserve_insn_bb): Likewise for param insn. (code_motion_path_driver): Likewise for local last_insn. (simplify_changed_insns): Likewise for local

[PATCH 110/236] rtlanal.c: Use rtx_insn

2014-08-06 Thread David Malcolm
* rtlanal.c (reg_used_between_p): Strengthen local insn from rtx to rtx_insn *. (reg_set_between_p): Strengthen local insn from const_rtx to const rtx_insn *. (modified_between_p): Strengthen local insn from rtx to rtx_insn *.

[PATCH 098/236] postreload.c: Use rtx_insn (also touches rtl.h and cprop.c)

2014-08-06 Thread David Malcolm
Also, update fis_get_condition gcc/ * rtl.h (fis_get_condition): Strengthen param jump from rtx to rtx_insn *. * cprop.c (fis_get_condition): Likewise. * postreload.c (reload_cse_regs): Likewise for param first. (reload_cse_simplify): Likewise for param

[PATCH 078/236] genpeep.c: peephole requires an rtx_insn

2014-08-06 Thread David Malcolm
Given an alphabetical ordering of this phase of the patches we can do this now, since the argument of peephole in final.c is by now an rtx_insn *. gcc/ * genpeep.c (main): Rename param back from uncast_ins1 to ins1, strengthening from rtx to rtx_insn *. Drop now-redundant

[PATCH 094/236] get_ebb_head_tail works with rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * sched-int.h (get_ebb_head_tail): Strengthen params headp and tailp from rtx * to rtx_insn **. * ddg.c (build_intra_loop_deps): Strengthen locals head, tail from rtx to rtx_insn *. * haifa-sched.c (get_ebb_head_tail): Strengthen params headp and

[PATCH 072/236] explow.c: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * explow.c (force_reg): Strengthen local insn from rtx to rtx_insn *. (adjust_stack_1): Likewise. (allocate_dynamic_stack_space): Likewise. Strengthen locals final_label, available_label, space_available from rtx to rtx_code_label *.

[PATCH 180/236] Params of add_insn and unlink_insn_chain

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (add_insn): Strengthen param from rtx to rtx_insn *. (unlink_insn_chain): Strengthen both params from rtx to rtx_insn *. * cfgrtl.c (cfg_layout_function_header): Likewise for this variable. (unlink_insn_chain): Likewise for params first

[PATCH 161/236] reorder_insns requires rtx_insn *

2014-08-06 Thread David Malcolm
All in-tree users of reorder_insns should now use rtx_insn * for each param. gcc/ * rtl.h (reorder_insns): Strengthen params from, to, after from rtx to rtx_insn *. * emit-rtl.c (reorder_insns): Likewise, also for local insn. --- gcc/emit-rtl.c | 4 ++-- gcc/rtl.h |

[PATCH 174/236] Remove VINSN_INSN_RTX scaffolding

2014-08-06 Thread David Malcolm
gcc/ * sel-sched-ir.h (struct vinsn_def): Strengthen field insn_rtx from rtx to rtx_insn *. (VINSN_INSN_RTX): Eliminate rvalue function and... (SET_VINSN_INSN): ...lvalue function in favor of... (VINSN_INSN_RTX): reinstate this old macro. *

[PATCH 039/236] create_insn_rtx_from_pattern and create_copy_of_insn_rtx return rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * sel-sched-ir.h (create_insn_rtx_from_pattern): Strengthen return type from rtx to rtx_insn *. * sel-sched-ir.h (create_copy_of_insn_rtx): Likewise. * sel-sched-ir.c (create_insn_rtx_from_pattern): Likewise. * sel-sched-ir.c (create_copy_of_insn_rtx):

[PATCH 196/236] Convert various INSN accessors in rtl.h to inline functions

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (INSN_UID): Convert from a macro to a pair of inline functions. Require merely an rtx for now, not an rtx_insn *, or rtx_real_insn *. (BLOCK_FOR_INSN): Likewise. (INSN_LOCATION): Likewise. (INSN_HAS_LOCATION): Convert from a macro to an

[PATCH 022/236] Make tablejump_p accept a rtx_jump_table_data **

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (tablejump_p): Strengthen third param from rtx * to rtx_jump_table_data **. * cfgbuild.c (make_edges): Introduce local table, using it in place of tmp for jump table data. (find_bb_boundaries): Strengthen local table from rtx to

[PATCH 153/236] config/tilepro: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/tilepro/tilepro-protos.h (tilepro_output_cbranch_with_opcode): Strengthen param 1 from rtx to rtx_insn *. (tilepro_output_cbranch): Likewise. (tilepro_adjust_insn_length): Likewise. (tilepro_final_prescan_insn): Likewise for sole param.

[PATCH 148/236] config/score/score.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/score/score.c (score_output_mi_thunk): Strengthen local insn from rtx to rtx_insn *. (score_prologue): Likewise. --- gcc/config/score/score.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config/score/score.c

[PATCH 119/236] store-motion.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * store-motion.c (store_killed_in_insn): Strengthen param insn from const_rtx to const rtx_insn *. (store_killed_after): Likewise. Strengthen locals last, act from rtx to rtx_insn *. (store_killed_before): Strengthen param insn from const_rtx to

[PATCH 100/236] print-rtl.c: Use rtx_insn for various debug_ functions (also touches config/rs6000/rs6000.c)

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (debug_rtx_list): Strengthen param 1 x from const_rtx to const rtx_insn *. (debug_rtx_range): Likewise for params 1 and 2 start and end. (debug_rtx_find): Likewise for param 1 x. * print-rtl.c (debug_rtx_list): Strengthen param 1 x from

[PATCH 139/236] config/mep: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * config/mep/mep-protos.h (mep_mulr_source): Strengthen first param from rtx to rtx_insn *. (mep_reuse_lo): Likewise for third param. (mep_use_post_modify_p): Likewise for first param. (mep_core_address_length): Likewise.

[PATCH 031/236] emit_jump_table_data returns an rtx_jump_table_data *

2014-08-06 Thread David Malcolm
gcc/ * emit-rtl.c (emit_jump_table_data): Strengthen return type from rtx to rtx_jump_table_data *. Also for local. * rtl.h (emit_jump_table_data): Likwise. --- gcc/emit-rtl.c | 5 +++-- gcc/rtl.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 228/236] tablejump_p takes an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (tablejump_p): Strengthen first param from const_rtx to const rtx_insn *. (label_is_jump_target_p): Likewise for second param. * rtlanal.c (tablejump_p): Likewise for param insn. (label_is_jump_target_p): Likewise for param jump_insn. ---

[PATCH 188/236] Use rtx_insn in more places in haifa-sched.c

2014-08-06 Thread David Malcolm
gcc/ * haifa-sched.c (struct model_insn_info): Strengthen field insn from rtx to rtx_insn *. (model_add_to_schedule): Likewise for locals start, end, iter. --- gcc/haifa-sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 163/236] unshare_all_rtl_again takes an rtx_insn *

2014-08-06 Thread David Malcolm
All in-tree users of unshare_all_rtl_again now pass in an rtx_insn *. gcc/ * rtl.h (unshare_all_rtl_again): Strengthen param insn from rtx to rtx_insn *. * emit-rtl.c (unshare_all_rtl_1): Likewise. (unshare_all_rtl_again): Likewise, also for local p. ---

[PATCH 101/236] recog.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * recog.c (split_insn): Strengthen param insn and locals first, last from rtx to rtx_insn *. * recog.c (split_all_insns): Likewise for locals insn, next. (split_all_insns_noflow): Likewise. --- gcc/recog.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH 033/236] emit_move et al return rtx_insn *

2014-08-06 Thread David Malcolm
gcc/ * expr.h (emit_move_insn): Strengthen return type from rtx to rtx_insn *. (emit_move_insn_1): Likewise. (emit_move_complex_push): Likewise. (emit_move_complex_parts): Likewise. * expr.c (emit_move_via_integer): Strengthen return type from rtx

<    1   2   3   4   5   >