diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-08-27 19:34:13 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-08-27 19:34:13 +0000 |
commit | ac44248e6abd1bfc0ed92a9ef66fbf4987cdea96 (patch) | |
tree | d5aca9a61ea42adcfa888f33107d59b9b198ce9e /gcc/config/sh/sh.c | |
parent | af48075062e32c2fd7816af4096d97459c5e5fc2 (diff) | |
download | gcc-ac44248e6abd1bfc0ed92a9ef66fbf4987cdea96.zip gcc-ac44248e6abd1bfc0ed92a9ef66fbf4987cdea96.tar.gz gcc-ac44248e6abd1bfc0ed92a9ef66fbf4987cdea96.tar.bz2 |
Use rtx_insn for various target.def hooks
gcc/
2014-08-27 David Malcolm <dmalcolm@redhat.com>
* target.def (unwind_emit): Strengthen param "insn" from rtx to
rtx_insn *.
(final_postscan_insn): Likewise.
(adjust_cost): Likewise.
(adjust_priority): Likewise.
(variable_issue): Likewise.
(macro_fusion_pair_p): Likewise.
(dfa_post_cycle_insn): Likewise.
(first_cycle_multipass_dfa_lookahead_guard): Likewise.
(first_cycle_multipass_issue): Likewise.
(dfa_new_cycle): Likewise.
(adjust_cost_2): Likewise for params "insn" and "dep_insn".
(speculate_insn): Likewise for param "insn".
(gen_spec_check): Likewise for params "insn" and "label".
(get_insn_spec_ds): Likewise for param "insn".
(get_insn_checked_ds): Likewise.
(dispatch_do): Likewise.
(dispatch): Likewise.
(cannot_copy_insn_p): Likewise.
(invalid_within_doloop): Likewise.
(legitimate_combined_insn): Likewise.
(needed): Likewise.
(after): Likewise.
* doc/tm.texi: Automatically updated to reflect changes to
target.def.
* haifa-sched.c (choose_ready): Convert NULL_RTX to NULL when
working with insn.
(schedule_block): Likewise.
(sched_init): Likewise.
(sched_speculate_insn): Strengthen param "insn" from rtx to
rtx_insn *.
(ready_remove_first_dispatch): Convert NULL_RTX to NULL when
working with insn.
* hooks.c (hook_bool_rtx_true): Rename to...
hook_bool_rtx_insn_true): ...this, and strengthen first param from
rtx to rtx_insn *.
(hook_constcharptr_const_rtx_null): Rename to...
(hook_constcharptr_const_rtx_insn_null): ...this, and strengthen
first param from const_rtx to const rtx_insn *.
(hook_bool_rtx_int_false): Rename to...
(hook_bool_rtx_insn_int_false): ...this, and strengthen first
param from rtx to rtx_insn *.
(hook_void_rtx_int): Rename to...
(hook_void_rtx_insn_int): ...this, and strengthen first param from
rtx to rtx_insn *.
* hooks.h (hook_bool_rtx_true): Rename to...
(hook_bool_rtx_insn_true): ...this, and strengthen first param from
rtx to rtx_insn *.
(hook_bool_rtx_int_false): Rename to...
(hook_bool_rtx_insn_int_false): ...this, and strengthen first
param from rtx to rtx_insn *.
(hook_void_rtx_int): Rename to...
(hook_void_rtx_insn_int): ...this, and strengthen first param from
rtx to rtx_insn *.
(hook_constcharptr_const_rtx_null): Rename to...
(hook_constcharptr_const_rtx_insn_null): ...this, and strengthen
first param from const_rtx to const rtx_insn *.
* sched-deps.c (sched_macro_fuse_insns): Strengthen param "insn"
and local "prev" from rtx to rtx_insn *.
* sched-int.h (sched_speculate_insn): Strengthen first param from
rtx to rtx_insn *.
* sel-sched.c (create_speculation_check): Likewise for local "label".
* targhooks.c (default_invalid_within_doloop): Strengthen param
"insn" from const_rtx to const rtx_insn *.
* targhooks.h (default_invalid_within_doloop): Strengthen param
from const_rtx to const rtx_insn *.
* config/alpha/alpha.c (alpha_cannot_copy_insn_p): Likewise.
(alpha_adjust_cost): Likewise for params "insn", "dep_insn".
* config/arc/arc.c (arc_sched_adjust_priority): Likewise for param
"insn".
(arc_invalid_within_doloop): Likewise, with const.
* config/arm/arm.c (arm_adjust_cost): Likewise for params "insn", "dep".
(arm_cannot_copy_insn_p): Likewise for param "insn".
(arm_unwind_emit): Likewise.
* config/bfin/bfin.c (bfin_adjust_cost): Likewise for params "insn",
"dep_insn".
* config/c6x/c6x.c (c6x_dfa_new_cycle): Likewise for param "insn".
(c6x_variable_issue): Likewise. Removed now-redundant checked
cast.
(c6x_adjust_cost): Likewise for params "insn", "dep_insn".
* config/epiphany/epiphany-protos.h (epiphany_mode_needed):
Likewise for param "insn".
(epiphany_mode_after): Likewise.
* config/epiphany/epiphany.c (epiphany_adjust_cost): Likewise for
params "insn", "dep_insn".
(epiphany_mode_needed): Likewise for param "insn".
(epiphany_mode_after): Likewise.
* config/i386/i386-protos.h (i386_pe_seh_unwind_emit): Likewise.
* config/i386/i386.c (ix86_legitimate_combined_insn): Likewise.
(ix86_avx_u128_mode_needed): Likewise.
(ix86_i387_mode_needed): Likewise.
(ix86_mode_needed): Likewise.
(ix86_avx_u128_mode_after): Likewise.
(ix86_mode_after): Likewise.
(ix86_adjust_cost): Likewise for params "insn", "dep_insn".
(ix86_macro_fusion_pair_p): Likewise for params "condgen", "condjmp".
(ix86_adjust_priority): Likewise for param "insn".
(core2i7_first_cycle_multipass_issue): Likewise for param "insn".
(do_dispatch): Likewise.
(has_dispatch): Likewise.
* config/i386/winnt.c (i386_pe_seh_unwind_emit): Likewise.
* config/ia64/ia64.c (TARGET_INVALID_WITHIN_DOLOOP): Update to
reflect renaming of default hook implementation from
hook_constcharptr_const_rtx_null to
hook_constcharptr_const_rtx_insn_null.
(ia64_adjust_cost_2): Strengthen params "insn", "dep_insn" from
rtx to rtx_insn *.
(ia64_variable_issue): Likewise for param "insn".
(ia64_first_cycle_multipass_dfa_lookahead_guard): Likewise.
(ia64_dfa_new_cycle): Likewise.
(ia64_get_insn_spec_ds): Likewise.
(ia64_get_insn_checked_ds): Likewise.
(ia64_speculate_insn): Likewise.
(ia64_gen_spec_check): Likewise for params "insn", "label".
(ia64_asm_unwind_emit): Likewise for param "insn".
* config/m32r/m32r.c (m32r_adjust_priority): Likewise.
* config/m68k/m68k.c (m68k_sched_adjust_cost): Likewise for params
"insn", "def_insn".
(m68k_sched_variable_issue): Likewise for param "insn".
* config/mep/mep.c (mep_adjust_cost): Likewise for params "insn",
"def_insn".
* config/microblaze/microblaze.c (microblaze_adjust_cost):
Likewise for params "insn", "dep".
* config/mips/mips.c (mips_adjust_cost): Likewise.
(mips_variable_issue): Likewise for param "insn".
(mips_final_postscan_insn): Likewise.
* config/mn10300/mn10300.c (mn10300_adjust_sched_cost): Likewise
for params "insn", "dep".
* config/pa/pa.c (pa_adjust_cost): Likewise for params "insn",
"dep_insn".
(pa_adjust_priority): Likewise for param "insn".
* config/picochip/picochip.c (picochip_sched_adjust_cost):
Likewise for params "insn", "dep_insn".
* config/rs6000/rs6000.c (rs6000_variable_issue_1): Likewise for
param "insn".
(rs6000_variable_issue): Likewise.
(rs6000_adjust_cost): Likewise for params "insn", "dep_insn".
(rs6000_debug_adjust_cost): Likewise.
(rs6000_adjust_priority): Likewise for param "insn".
(rs6000_use_sched_lookahead_guard): Likewise.
(get_next_active_insn): Likewise for return type and both params.
(redefine_groups): Likewise for params "prev_head_insn", "tail"
and locals "insn", "next_insn".
(pad_groups): Likewise.
* config/s390/s390.c (s390_adjust_priority): Likewise for param
"insn".
(s390_cannot_copy_insn_p): Likewise.
(s390_sched_variable_issue): Likewise for third param, eliminating
checked cast.
(TARGET_INVALID_WITHIN_DOLOOP): Update to reflect renaming of
default hook implementation from hook_constcharptr_const_rtx_null
to hook_constcharptr_const_rtx_insn_null.
* config/sh/sh.c (sh_cannot_copy_insn_p): Strengthen param "insn"
from rtx to rtx_insn *.
(sh_adjust_cost): Likewise for params "insn", "dep_insn".
(sh_variable_issue): Likewise for param "insn".
(sh_dfa_new_cycle): Likewise.
(sh_mode_needed): Likewise.
(sh_mode_after): Likewise.
* config/sparc/sparc.c (supersparc_adjust_cost): Likewise for
params "insn", "dep_insn".
(hypersparc_adjust_cost): Likewise.
(sparc_adjust_cost): Likewise.
* config/spu/spu.c (spu_sched_variable_issue): Likewise for third
param, eliminated checked cast.
(spu_sched_adjust_cost): Likewise for first and third params.
* config/tilegx/tilegx.c (tilegx_sched_adjust_cost): Strengthen
params "insn" and "dep_insn" from rtx to rtx_insn *.
* config/tilepro/tilepro.c (tilepro_sched_adjust_cost): Likewise.
From-SVN: r214584
Diffstat (limited to 'gcc/config/sh/sh.c')
-rw-r--r-- | gcc/config/sh/sh.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index d2eb34d..ec3b200 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -203,8 +203,8 @@ static int calc_live_regs (HARD_REG_SET *); static HOST_WIDE_INT rounded_frame_size (int); static bool sh_frame_pointer_required (void); static void sh_emit_mode_set (int, int, int, HARD_REG_SET); -static int sh_mode_needed (int, rtx); -static int sh_mode_after (int, int, rtx); +static int sh_mode_needed (int, rtx_insn *); +static int sh_mode_after (int, int, rtx_insn *); static int sh_mode_entry (int); static int sh_mode_exit (int); static int sh_mode_priority (int entity, int n); @@ -227,9 +227,9 @@ static void sh_output_function_epilogue (FILE *, HOST_WIDE_INT); static void sh_insert_attributes (tree, tree *); static const char *sh_check_pch_target_flags (int); static int sh_register_move_cost (enum machine_mode, reg_class_t, reg_class_t); -static int sh_adjust_cost (rtx, rtx, rtx, int); +static int sh_adjust_cost (rtx_insn *, rtx, rtx_insn *, int); static int sh_issue_rate (void); -static int sh_dfa_new_cycle (FILE *, int, rtx, int, int, int *sort_p); +static int sh_dfa_new_cycle (FILE *, int, rtx_insn *, int, int, int *sort_p); static short find_set_regmode_weight (rtx, enum machine_mode); static short find_insn_regmode_weight (rtx, enum machine_mode); static void find_regmode_weight (basic_block, enum machine_mode); @@ -243,7 +243,7 @@ static bool high_pressure (enum machine_mode); static int sh_reorder (FILE *, int, rtx_insn **, int *, int); static int sh_reorder2 (FILE *, int, rtx_insn **, int *, int); static void sh_md_init (FILE *, int, int); -static int sh_variable_issue (FILE *, int, rtx, int); +static int sh_variable_issue (FILE *, int, rtx_insn *, int); static bool sh_function_ok_for_sibcall (tree, tree); @@ -265,7 +265,7 @@ static int and_xor_ior_costs (rtx, int); static int addsubcosts (rtx); static int multcosts (rtx); static bool unspec_caller_rtx_p (rtx); -static bool sh_cannot_copy_insn_p (rtx); +static bool sh_cannot_copy_insn_p (rtx_insn *); static bool sh_rtx_costs (rtx, int, int, int, int *, bool); static int sh_address_cost (rtx, enum machine_mode, addr_space_t, bool); static int sh_pr_n_sets (void); @@ -2948,7 +2948,7 @@ unspec_caller_rtx_p (rtx pat) /* Indicate that INSN cannot be duplicated. This is true for insn that generates a unique label. */ static bool -sh_cannot_copy_insn_p (rtx insn) +sh_cannot_copy_insn_p (rtx_insn *insn) { rtx pat; @@ -10784,7 +10784,8 @@ sh_hard_regno_rename_ok (unsigned int old_reg ATTRIBUTE_UNUSED, the same cost as a data-dependence. The return value should be the new value for COST. */ static int -sh_adjust_cost (rtx insn, rtx link ATTRIBUTE_UNUSED, rtx dep_insn, int cost) +sh_adjust_cost (rtx_insn *insn, rtx link ATTRIBUTE_UNUSED, + rtx_insn *dep_insn, int cost) { rtx reg, use_pat; @@ -11272,7 +11273,7 @@ sh_scalar_mode_supported_p (enum machine_mode mode) static int sh_variable_issue (FILE *dump ATTRIBUTE_UNUSED, int sched_verbose ATTRIBUTE_UNUSED, - rtx insn, + rtx_insn *insn, int can_issue_more) { if (GET_CODE (PATTERN (insn)) != USE @@ -11369,7 +11370,7 @@ sh_reorder2 (FILE *dump ATTRIBUTE_UNUSED, static int sh_dfa_new_cycle (FILE *sched_dump ATTRIBUTE_UNUSED, int sched_verbose ATTRIBUTE_UNUSED, - rtx insn ATTRIBUTE_UNUSED, + rtx_insn *insn ATTRIBUTE_UNUSED, int last_clock_var, int clock_var, int *sort_p) @@ -13630,13 +13631,13 @@ sh_emit_mode_set (int entity ATTRIBUTE_UNUSED, int mode, } static int -sh_mode_needed (int entity ATTRIBUTE_UNUSED, rtx insn) +sh_mode_needed (int entity ATTRIBUTE_UNUSED, rtx_insn *insn) { return recog_memoized (insn) >= 0 ? get_attr_fp_mode (insn) : FP_MODE_NONE; } static int -sh_mode_after (int entity ATTRIBUTE_UNUSED, int mode, rtx insn) +sh_mode_after (int entity ATTRIBUTE_UNUSED, int mode, rtx_insn *insn) { if (TARGET_HITACHI && recog_memoized (insn) >= 0 && get_attr_fp_set (insn) != FP_SET_NONE) |