[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 used

[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

[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):

[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

[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_i

[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 --- a/gcc/stack-

[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 PREV_INSN/NE

[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 b/

[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 @@ exi

[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(+),

[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 +++ b/gc

[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): Likewi

[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 ch

[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 mini

[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, ren

[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_ins

[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 inse

[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 checke

[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 prototyp

[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 NUL

[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 "ehr_l

[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 ::test): New overload, accepting an rtx_insn *. (last_call_insn): Strengthen return type from rtx to rtx_call_insn *. --- gcc/emit-rtl.c | 6

[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 retu

[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 *. (remove_re

[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 para

[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" a

[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. * sel-sch

[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): L

[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 rt

[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 b/gcc/config/score

[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" fro

[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. (mep_cop_address_length)

[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 a/

[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". --- g

[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 a/gcc/haif

[PATCH 095/236] modulo-sched.c: Use rtx_insn in various places

2014-08-06 Thread David Malcolm
gcc/ * modulo-sched.c (struct ps_reg_move_info): Strengthen field "insn" from rtx to rtx_insn *. (ps_rtl_insn): Likewise for return type. (doloop_register_get): Likewise for params "head", "tail" and locals "insn", "first_insn_not_to_check". (schedule

[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". --- gcc/e

[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 insertio

[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

[PATCH 172/236] sel-sched-ir.h: Make ilist_t work on insn_t rather than rtx

2014-08-06 Thread David Malcolm
gcc/ * sel-sched-ir.h (ilist_t): Redefine this typedef in terms of ilist_t, not _xlist_t; (ILIST_INSN): Define in terms of new union field "insn". (ILIST_NEXT): Define in terms of _LIST_NEXT rather than _XLIST_NEXT. (struct _list_node): Add new field

[PATCH 106/236] regrename.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * regrename.c (create_new_chain): Strengthen param "insn" from rtx to rtx_insn *. (init_rename_info): Replace use of NULL_RTX with NULL when dealing with an insn. (regrename_analyze): Strengthen local "insn" from rtx to rtx_insn *. (scan_

[PATCH 011/236] Replace PREV_INSN et al macros with functions

2014-08-06 Thread David Malcolm
Yet more scaffolding: convert the NEXT_INSN/PREV_INSN macros and their SET_* variants into functions. Convert the rvalue-style functions into returning rtx_insn * rather than plain rtx. For now, this is done by adding a checked cast, but I hope this can eventually become a field lookup. The lval

[PATCH 147/236] config/s390: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * config/s390/s390-protos.h (s390_match_ccmode): Strengthen param 1 from rtx to rtx_insn *. (s390_emit_jump): Likewise for return type. (s390_emit_call): Likewise. (s390_load_got): Likewise. * config/s390/s390.c (last_scheduled_insn): Likewise f

[PATCH 043/236] peephole returns an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * output.h (peephole): Strengthen return type from rtx to rtx_insn *. * rtl.h (delete_for_peephole): Likewise for both params. * genpeep.c (main): In generated "peephole" function, strengthen return type and local "insn" from rtx to rtx_insn *. For now,

[PATCH 051/236] bb-reorder.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * bb-reorder.c (copy_bb_p): Strengthen local "insn" from rtx to rtx_insn *. (get_uncond_jump_length): Likewise for locals "label", "jump". (fix_up_crossing_landing_pad): Likewise for locals "new_label", "jump", "insn". (add_labels_and_missing_jum

[PATCH 073/236] expmed.c: Use rtx_insn and rtx_code_label

2014-08-06 Thread David Malcolm
gcc/ * expmed.c (store_bit_field_using_insv): Strengthen local "last" from rtx to rtx_insn *. (store_bit_field_1): Likewise. (extract_bit_field_1): Likewise. (expand_mult_const): Likewise for local "insns". (expmed_mult_highpart): Strengthen local "la

[PATCH 052/236] bt-load.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * bt-load.c (struct btr_user_s): Strengthen field "insn" from rtx to rtx_insn *. (struct btr_def_s): Likewise. (insn_sets_btr_p): Strengthen param "insn" from const_rtx to const rtx_insn *. (add_btr_def): Likewise. (new_btr_user): Likewis

[PATCH 183/236] Strengthen various insn emission functions

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (push_to_sequence): Strengthen param from rtx to rtx_insn *. (push_to_sequence2): Likewise for both params. (delete_insns_since): Likewise for param. (reorder_insns_nobb): Likewise for all three params. (set_new_first_and_last_insn): Like

[PATCH 046/236] delete_related_insns returns an rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (delete_related_insns): Strengthen return type from rtx to rtx_insn *. * jump.c (delete_related_insns): Likewise, also for locals "next" and "prev". --- gcc/jump.c | 4 ++-- gcc/rtl.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --gi

[PATCH 097/236] postreload-gcse.c: Use rtx_insn in various places

2014-08-06 Thread David Malcolm
gcc/ * postreload-gcse.c (struct occr): Strengthen field "insn" from rtx to rtx_insn *. (struct unoccr): Likewise. (struct modifies_mem): Likewise. (alloc_mem): Likewise for local "insn". (insert_expr_in_table): Likewise for param "insn". (dum

[PATCH 089/236] loop-iv.c: Use rtx_insn (also touches cfgloop.h and loop-unroll.c)

2014-08-06 Thread David Malcolm
gcc/ * cfgloop.h (iv_analyze): Strengthen param 1 "insn" from rtx to rtx_insn *. (iv_analyze_result): Likewise. (iv_analyze_expr): Likewise. (biv_p): Likewise. * loop-iv.c (iv_get_reaching_def): Strengthen param "insn" and local "def_insn" fr

[PATCH 075/236] final.c: Use rtx_insn (also touches output.c and config/arc/arc.c)

2014-08-06 Thread David Malcolm
In particular, after this patch, the first param passed to the FINAL_PRESCAN_INSN macro is strengthened from rtx to rtx_insn *. gcc/ * output.h (final_scan_insn): Strengthen return type from rtx to rtx_insn *. (final_forward_branch_p): Likewise for param. (current_o

[PATCH 091/236] lower-subreg.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * lower-subreg.c (simple_move): Strengthen param "insn" from rtx to rtx_insn *. (resolve_reg_notes): Likewise. (resolve_simple_move): Likewise for return type, param "insn", and locals "insns", "minsn". (resolve_clobber): Strengthen param "insn"

[PATCH 093/236] mode-switching.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * mode-switching.c (struct seginfo): Strengthen field "insn_ptr" from rtx to rtx_insn *. (new_seginfo): Likewise for param "insn". (create_pre_exit): Likewise for locals "last_insn", "before_return_copy", "return_copy". (optimize_mode_switching):

[PATCH 053/236] builtins.c: strengthen various rtx to rtx_insn * and other subclasses

2014-08-06 Thread David Malcolm
gcc/ * builtins.c (expand_builtin_longjmp): Strengthen locals "insn" and "last" from rtx to rtx_insn *. (expand_builtin_nonlocal_goto): Likewise for local "insn". (expand_builtin_apply): Strengthen local "call_insn" from rtx to rtx_call_insn *. (expan

[PATCH 057/236] cfgcleanup.c: Use rtx_insn (also touches basic-block.h and ifcvt.c)

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (flow_find_cross_jump): Strengthen params 3 and 4 "f1" and "f2" from rtx * to rtx_insn **. (flow_find_head_matching_sequence): Likewise. * cfgcleanup.c (try_simplify_condjump): Strengthen local "cbranch_insn" from rtx to rtx_insn *.

[PATCH 105/236] reginfo.c: Use rtx_insn (also touches rtl.h)

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (reg_scan): Strengthen param "f" from rtx to rtx_insn *. * reginfo.c (reg_scan): Likewise, also for local "insn". (reg_scan_mark_refs): Likewise for param "insn". (init_subregs_of_mode): Likewise for local "insn". --- gcc/reginfo.c | 10 +- gcc/

[PATCH 158/236] Remove BB_FOOTER scaffolding

2014-08-06 Thread David Malcolm
gcc/ * basic-block.h (struct rtl_bb_info): Strengthen field "footer_" from rtx to rtx_insn *. (BB_FOOTER): Replace function with access macro. (SET_BB_FOOTER): Delete. * cfgcleanup.c (try_optimize_cfg): Replace uses of SET_BB_FOOTER with BB_FOOTER.

[PATCH 126/236] config/alpha/alpha.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/alpha/alpha.c (alpha_emit_set_const): Strengthen local "insn" from rtx to rtx_insn *. (alpha_gp_save_rtx): Likewise for local "seq". (alpha_instantiate_decls): Likewise for local "top". (get_some_local_dynamic_name): Likewise for local "insn".

Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)

2014-08-06 Thread DJ Delorie
> As for PSImode, I dunno - seems only m32c and AVR use that? I have no > way how to perform testing on such targets. and msp430. m32c and msp430 have simulators in gdb.

[PATCH 160/236] function.c and shrink-wrap.*: more rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * function.c (thread_prologue_and_epilogue_insns): Likewise for locals "returnjump", "epilogue_end", "insn", "next". * shrink-wrap.h (get_unconverted_simple_return): Strengthen param "returnjump" from rtx * to rtx_insn **. * shrink-wrap.c (get_unconvert

[PATCH 198/236] PHASE 5: Additional rtx 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 5667ae9..e51b0f3 100644 --- a/rtx-classes-status.txt +++ b/rtx-classes-status.txt @@ -4,8 +4,8 @@ exi

[PATCH 014/236] VINSN_INSN_RTX scaffolding

2014-08-06 Thread David Malcolm
For now, convert into VINSN_INSN_RTX a pair of functions. We will eventually change them back to a macro once the relevant field is of type rtx_insn *. gcc/ * sel-sched-ir.h (VINSN_INSN_RTX): struct vinsn_def's "insn_rtx" field will eventually be an rtx_insn *. To help with trans

[PATCH 176/236] cselib and incdec

2014-08-06 Thread David Malcolm
gcc/ * rtl.h (for_each_inc_dec): Strengthen param 1 from rtx * to rtx_insn **. (check_for_inc_dec): Strengthen param "insn" from rtx to rtx_insn *. * cselib.h (cselib_process_insn): Likewise. * cselib.c (cselib_record_sets): Likewise. (cseli

[PATCH 060/236] cfgrtl.c: Use rtx subclasses

2014-08-06 Thread David Malcolm
gcc/ * cfgrtl.c (can_delete_note_p): Require a const rtx_note * rather than a const_rtx. (can_delete_label_p): Require a const rtx_code_label * rather than a const_rtx. (delete_insn): Add checked cast to rtx_code_label * when we know we're dealing wit

[PATCH 197/236] Tweak to ira-lives.c

2014-08-06 Thread David Malcolm
gcc/ * ira-lives.c (find_call_crossed_cheap_reg): Strengthen local "prev" from rtx to rtx_insn *. --- gcc/ira-lives.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c index 4875399..98bbd4d 100644 --- a/gcc/ira-lives.c +++ b/gcc/

[PATCH 064/236] cprop.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * cprop.c (struct occr): Strengthen field "insn" from rtx to rtx_insn *. (reg_available_p): Likewise for param "insn". (insert_set_in_table): Likewise. (hash_scan_set): Likewise. (hash_scan_insn): Likewise. (make_set_regs_unavailable): Li

[PATCH 152/236] config/tilegx: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/tilegx/tilegx-protos.h (tilegx_output_cbranch_with_opcode): Strengthen param 1 from rtx to rtx_insn *. (tilegx_output_cbranch): Likewise. (tilegx_adjust_insn_length): Likewise. (tilegx_final_prescan_insn): Likewise for sole param. * con

[PATCH 190/236] Remove insn_addresses_new from 'various scheduling strengthenings'

2014-08-06 Thread David Malcolm
--- gcc/insn-addr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/insn-addr.h b/gcc/insn-addr.h index e255ac4..aec09fd 100644 --- a/gcc/insn-addr.h +++ b/gcc/insn-addr.h @@ -38,7 +38,7 @@ extern int insn_current_address; #define INSN_ADDRESSES_SIZE() (insn_addresses_.len

[PATCH 062/236] combine-stack-adj.c: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * combine-stack-adj.c (struct csa_reflist): Strengthen field "insn" from rtx to rtx_insn *. (single_set_for_csa): Likewise for param "insn". (record_one_stack_ref): Likewise. (try_apply_stack_adjustment): Likewise. (struct record_stack_refs_data)

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

2014-08-06 Thread Jakub Jelinek
On Wed, Aug 06, 2014 at 01:22:54PM -0400, David Malcolm wrote: > 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/g

[PATCH 208/236] resource.c: Use rtx_sequence

2014-08-06 Thread David Malcolm
gcc/ * resource.c (mark_referenced_resources): Strengthen local "sequence" from rtx to rtx_sequence *, adding a checked cast, and using methods of rtx_sequence to clarify the code. (find_dead_or_set_registers): Within the switch statement, convert a GET_CODE

[PATCH 113/236] sched-rgn.c: Use rtx_insn in a couple of places

2014-08-06 Thread David Malcolm
gcc/ * sched-rgn.c (is_cfg_nonregular): Strengthen locals "insn" and "next" from rtx to rtx_insn *. (find_conditional_protection): Likewise for local "next". (is_conditionally_protected): Likewise for local "insn1". (is_pfree): Likewise for locals "insn1", "i

[PATCH 154/236] config/v850: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/v850/v850-protos.h (v850_adjust_insn_length): Strengthen first param from rtx to rtx_insn *. * config/v850/v850.c (v850_adjust_insn_length): Likewise for param "insn". --- gcc/config/v850/v850-protos.h | 2 +- gcc/config/v850/v850.c| 2 +- 2 fi

[PATCH 129/236] config/avr: Use rtx_insn

2014-08-06 Thread David Malcolm
gcc/ * config/avr/avr-protos.h (output_movqi): Strengthen first param from rtx to rtx_insn *. (output_movhi): Likewise. (output_movsisf): Likewise. (avr_out_tstsi): Likewise. (avr_out_tsthi): Likewise. (avr_out_tstpsi): Likewise. (avr_

  1   2   3   4   >