diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-09-05 15:15:43 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-09-05 15:15:43 +0000 |
commit | 68a1a6c080d945adc22c5098e155c7ad500f81df (patch) | |
tree | 8272e74f022e13f012f684eb2e0cf6341dc29782 /gcc/jump.c | |
parent | 45700b6a428bafde0fae9b67dd494f3cac3d9bf0 (diff) | |
download | gcc-68a1a6c080d945adc22c5098e155c7ad500f81df.zip gcc-68a1a6c080d945adc22c5098e155c7ad500f81df.tar.gz gcc-68a1a6c080d945adc22c5098e155c7ad500f81df.tar.bz2 |
Use rtx_insn for various jump-handling functions and predicates
gcc/ChangeLog:
2014-09-05 David Malcolm <dmalcolm@redhat.com>
* config/arc/arc.c (arc_print_operand): Use insn method of
final_sequence for type-safety.
* config/bfin/bfin.c (bfin_hardware_loop): Strengthen param
"insn" from rtx to rtx_insn *.
* config/frv/frv.c (frv_print_operand_jump_hint): Likewise.
* config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc):
Likewise for locals "branch", "label".
* config/h8300/h8300.c (same_cmp_preceding_p): Likewise for
locals "i1", "i2". Use NULL rather than NULL_RTX in comparisons.
(same_cmp_following_p): Likewise for locals "i2", "i3".
* config/sh/sh_optimize_sett_clrt.cc
(sh_optimize_sett_clrt::sh_cbranch_ccreg_value): Likewise for
param "cbranch_insn".
* function.c (convert_jumps_to_returns): Likewis for local "jump".
* ifcvt.c (cond_exec_get_condition): Likewise for param "jump".
* jump.c (simplejump_p): Strengthen param "insn" from const_rtx to
const rtx_insn *.
(condjump_p): Likewise.
(condjump_in_parallel_p): Likewise.
(pc_set): Likewise.
(any_uncondjump_p): Likewise.
(any_condjump_p): Likewise.
(condjump_label): Likewise.
(returnjump_p): Strengthen param "insn" from rtx to
const rtx_insn *.
(onlyjump_p): Strengthen param "insn" from const_rtx to
const rtx_insn *.
(jump_to_label_p): Likewise.
(invert_jump_1): Strengthen param "jump" from rtx to rtx_insn *.
(invert_jump): Likewise.
* reorg.c (simplejump_or_return_p): Add checked cast when calling
simplejump_p.
(get_jump_flags): Strengthen param "insn" from rtx to
const rtx_insn *.
(get_branch_condition): Likewise.
(condition_dominates_p): Likewise.
(make_return_insns): Move declaration of local "pat" earlier, to
after we've handled NONJUMP_INSN_P and non-sequences, using its
methods to simplify the code and for type-safety.
* rtl.h (find_constant_src): Strengthen param from const_rtx to
const rtx_insn *.
(jump_to_label_p): Strengthen param from rtx to const rtx_insn *.
(condjump_p): Strengthen param from const_rtx to
const rtx_insn *.
(any_condjump_p): Likewise.
(any_uncondjump_p): Likewise.
(pc_set): Likewise.
(condjump_label): Likewise.
(simplejump_p): Likewise.
(returnjump_p): Likewise.
(onlyjump_p): Likewise.
(invert_jump_1): Strengthen param 1 from rtx to rtx_insn *.
(invert_jump): Likewise.
(condjump_in_parallel_p): Strengthen param from const_rtx to
const rtx_insn *.
* rtlanal.c (find_constant_src): Strengthen param from const_rtx
to const rtx_insn *.
* sel-sched-ir.c (fallthru_bb_of_jump): Strengthen param from rtx
to const rtx_insn *.
* sel-sched-ir.h (fallthru_bb_of_jump): Likewise.
From-SVN: r214970
Diffstat (limited to 'gcc/jump.c')
-rw-r--r-- | gcc/jump.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -766,7 +766,7 @@ comparison_dominates_p (enum rtx_code code1, enum rtx_code code2) /* Return 1 if INSN is an unconditional jump and nothing else. */ int -simplejump_p (const_rtx insn) +simplejump_p (const rtx_insn *insn) { return (JUMP_P (insn) && GET_CODE (PATTERN (insn)) == SET @@ -781,7 +781,7 @@ simplejump_p (const_rtx insn) branch and compare insns. Use any_condjump_p instead whenever possible. */ int -condjump_p (const_rtx insn) +condjump_p (const rtx_insn *insn) { const_rtx x = PATTERN (insn); @@ -809,7 +809,7 @@ condjump_p (const_rtx insn) branch and compare insns. Use any_condjump_p instead whenever possible. */ int -condjump_in_parallel_p (const_rtx insn) +condjump_in_parallel_p (const rtx_insn *insn) { const_rtx x = PATTERN (insn); @@ -840,7 +840,7 @@ condjump_in_parallel_p (const_rtx insn) /* Return set of PC, otherwise NULL. */ rtx -pc_set (const_rtx insn) +pc_set (const rtx_insn *insn) { rtx pat; if (!JUMP_P (insn)) @@ -861,7 +861,7 @@ pc_set (const_rtx insn) possibly bundled inside a PARALLEL. */ int -any_uncondjump_p (const_rtx insn) +any_uncondjump_p (const rtx_insn *insn) { const_rtx x = pc_set (insn); if (!x) @@ -881,7 +881,7 @@ any_uncondjump_p (const_rtx insn) Note that unlike condjump_p it returns false for unconditional jumps. */ int -any_condjump_p (const_rtx insn) +any_condjump_p (const rtx_insn *insn) { const_rtx x = pc_set (insn); enum rtx_code a, b; @@ -902,7 +902,7 @@ any_condjump_p (const_rtx insn) /* Return the label of a conditional jump. */ rtx -condjump_label (const_rtx insn) +condjump_label (const rtx_insn *insn) { rtx x = pc_set (insn); @@ -923,7 +923,7 @@ condjump_label (const_rtx insn) /* Return TRUE if INSN is a return jump. */ int -returnjump_p (rtx insn) +returnjump_p (const rtx_insn *insn) { if (JUMP_P (insn)) { @@ -970,7 +970,7 @@ eh_returnjump_p (rtx_insn *insn) nothing more. */ int -onlyjump_p (const_rtx insn) +onlyjump_p (const rtx_insn *insn) { rtx set; @@ -991,7 +991,7 @@ onlyjump_p (const_rtx insn) /* Return true iff INSN is a jump and its JUMP_LABEL is a label, not NULL or a return. */ bool -jump_to_label_p (rtx insn) +jump_to_label_p (const rtx_insn *insn) { return (JUMP_P (insn) && JUMP_LABEL (insn) != NULL && !ANY_RETURN_P (JUMP_LABEL (insn))); @@ -1656,7 +1656,7 @@ invert_exp_1 (rtx x, rtx insn) inversion and redirection. */ int -invert_jump_1 (rtx jump, rtx nlabel) +invert_jump_1 (rtx_insn *jump, rtx nlabel) { rtx x = pc_set (jump); int ochanges; @@ -1680,7 +1680,7 @@ invert_jump_1 (rtx jump, rtx nlabel) NLABEL instead of where it jumps now. Return true if successful. */ int -invert_jump (rtx jump, rtx nlabel, int delete_unused) +invert_jump (rtx_insn *jump, rtx nlabel, int delete_unused) { rtx olabel = JUMP_LABEL (jump); |