summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-30 14:26:42 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-30 14:26:42 +0000
commit91f71fa37e7fbc09bbef70bfe2aeb4d9b3b9c87e (patch)
treee26ba89a7001938413a07a7ffa3e4305911badc8 /gcc/reload1.c
parentea58ca59034c74779e0d5f754c817b51afd085cf (diff)
downloadgcc-91f71fa37e7fbc09bbef70bfe2aeb4d9b3b9c87e.tar.gz
* cfgrtl.c (fixup_reorder_chain): Do not emit barriers to BB_FOOTER.
* postreload-gcse.c (bb_has_well_behaved_predecessors): Correct test for table jump at the end of a basic block using tablejump_p. * targhooks.c (default_invalid_within_doloop): Likewise. * config/rs6000/rs6000.c (TARGET_INVALID_WITHIN_DOLOOP): Remove target hook implementation that is identical to the default hook. (rs6000_invalid_within_doloop): Remove. * bb-reorder.c (fix_crossing_unconditional_branches): Remove set but unused variable from tablejump_p call. * rtl.def (JUMP_TABLE_DATA): New RTX_INSN object. * rtl.h (RTX_PREV, RTX_NEXT): Adjust for new JUMP_TABLE_DATA. (INSN_DELETED_P): Likewise. (emit_jump_table_data): New prototype. * gengtype.c (adjust_field_rtx_def): Handle JUMP_TABLE_DATA fields after 4th as unused. * print-rtl.c (print_rtl): Handle JUMP_TABLE_DATA. * sched-vis.c (print_insn): Likewise. * emit-rtl.c (active_insn_p): Consider JUMP_TABLE_DATA an active insn for compatibility with back ends that use next_active_insn to identify jump table data. (set_insn_deleted): Remove no longer useful JUMP_TABLE_DATA_P check. (remove_insn): Likewise. (emit_insn): Do not accept JUMP_TABLE_DATA objects in insn chains to be emitted. (emit_debug_insn, emit_jump_insn, emit_call_insn, emit_label): Idem. (emit_jump_table_data): New function. * cfgbuild.c (inside_basic_block_p): A JUMP_INSN is always inside a basic block, a JUMP_TABLE_DATA never is. (control_flow_insn_p): JUMP_TABLE_DATA is not a control flow insn. * cfgrtl.c (duplicate_insn_chain): Split handling of JUMP_TABLE_DATA off from code handling real insns. * final.c (get_attr_length_1): Simplify for JUMP_INSNs. * function.c (instantiate_virtual_regs): Remove JUMP_TABLE_DATA_P test, now redundant because JUMP_TABLE_DATA is not an INSN_P insn. * gcse.c (insert_insn_end_basic_block): Likewise, JUMP_TABLE_DATA_P is not a NONDEBUG_INSN_P. * ira-costs.c (scan_one_insn): Likewise. * jump.c (mark_all_labels): Likewise. (mark_jump_label_1): Likewise. * lra-eliminations.c (eliminate_regs_in_insn): Likewise. * lra.c (get_insn_freq): Expect all insns reaching here to be in a basic block. (check_rtl): Remove JUMP_TABLE_DATA_P test, not a NONDEBUG_INSN_P insn. * predict.c (expensive_function_p): Use FOR_BB_INSNS. * reload1.c (calculate_needs_all_insns): Call set_label_offsets for JUMP_TABLE_DATA_P insns. (calculate_elim_costs_all_insns): Likewise. (set_label_offsets): Recurse on the PATTERN of JUMP_TABLE_DATA insns. (elimination_costs_in_insn): Remove redundant JUMP_TABLE_DATA_P test. (delete_output_reload): Code style fixups. * reorg.c (dbr_schedule): Move JUMP_TABLE_DATA_P up to avoid setting insn flags on this non-insn. * sched-rgn.c (add_branch_dependences): Treat JUMP_TABLE_DATA insns as scheduling barriers, for pre-change compatibility. * stmt.c (emit_case_dispatch_table): Emit jump table data not as JUMP_INSN objects but instead as JUMP_TABLE_DATA objects. * config/alpha/alpha.c (alpha_does_function_need_gp): Remove redundant JUMP_TABLE_DATA_P test. * config/arm/arm.c (thumb_far_jump_used_p): Likewise. * config/frv/frv.c (frv_function_contains_far_jump): Likewise. (frv_for_each_packet): Likewise. * config/i386/i386.c (min_insn_size): Likewise. (ix86_avoid_jump_mispredicts): Likewise. * config/m32r/m32r.c (m32r_is_insn): Likewise. * config/mep/mep.c (mep_reorg_erepeat): Likewise. * config/mips/mips.c (USEFUL_INSN_P): Likewise. (mips16_insn_length): Robustify. (mips_has_long_branch_p): Remove redundant JUMP_TABLE_DATA_P test. (mips16_split_long_branches): Likewise. * config/pa/pa.c (pa_combine_instructions): Likewise. * config/rs6000/rs6000.c (get_next_active_insn): Treat JUMP_TABLE_DATA objects as active insns, like in active_insn_p. * config/s390/s390.c (s390_chunkify_start): Treat JUMP_TABLE_DATA as contributing to pool range lengths. * config/sh/sh.c (find_barrier): Restore check for ADDR_DIFF_VEC. Remove redundant JUMP_TABLE_DATA_P test. (sh_loop_align): Likewise. (split_branches): Likewise. (sh_insn_length_adjustment): Likewise. * config/spu/spu.c (get_branch_target): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197266 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 7d6b5ddce4e..b8c3bfabbfb 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1490,7 +1490,7 @@ calculate_needs_all_insns (int global)
include REG_LABEL_OPERAND and REG_LABEL_TARGET), we need to see
what effects this has on the known offsets at labels. */
- if (LABEL_P (insn) || JUMP_P (insn)
+ if (LABEL_P (insn) || JUMP_P (insn) || JUMP_TABLE_DATA_P (insn)
|| (INSN_P (insn) && REG_NOTES (insn) != 0))
set_label_offsets (insn, insn, 0);
@@ -1620,7 +1620,7 @@ calculate_elim_costs_all_insns (void)
include REG_LABEL_OPERAND and REG_LABEL_TARGET), we need to see
what effects this has on the known offsets at labels. */
- if (LABEL_P (insn) || JUMP_P (insn)
+ if (LABEL_P (insn) || JUMP_P (insn) || JUMP_TABLE_DATA_P (insn)
|| (INSN_P (insn) && REG_NOTES (insn) != 0))
set_label_offsets (insn, insn, 0);
@@ -2404,6 +2404,10 @@ set_label_offsets (rtx x, rtx insn, int initial_p)
return;
+ case JUMP_TABLE_DATA:
+ set_label_offsets (PATTERN (insn), insn, initial_p);
+ return;
+
case JUMP_INSN:
set_label_offsets (PATTERN (insn), insn, initial_p);
@@ -3234,11 +3238,10 @@ eliminate_regs_in_insn (rtx insn, int replace)
if (! insn_is_asm && icode < 0)
{
- gcc_assert (JUMP_TABLE_DATA_P (insn)
+ gcc_assert (DEBUG_INSN_P (insn)
|| GET_CODE (PATTERN (insn)) == USE
|| GET_CODE (PATTERN (insn)) == CLOBBER
- || GET_CODE (PATTERN (insn)) == ASM_INPUT
- || DEBUG_INSN_P (insn));
+ || GET_CODE (PATTERN (insn)) == ASM_INPUT);
if (DEBUG_INSN_P (insn))
INSN_VAR_LOCATION_LOC (insn)
= eliminate_regs (INSN_VAR_LOCATION_LOC (insn), VOIDmode, insn);
@@ -3644,11 +3647,10 @@ elimination_costs_in_insn (rtx insn)
if (! insn_is_asm && icode < 0)
{
- gcc_assert (JUMP_TABLE_DATA_P (insn)
+ gcc_assert (DEBUG_INSN_P (insn)
|| GET_CODE (PATTERN (insn)) == USE
|| GET_CODE (PATTERN (insn)) == CLOBBER
- || GET_CODE (PATTERN (insn)) == ASM_INPUT
- || DEBUG_INSN_P (insn));
+ || GET_CODE (PATTERN (insn)) == ASM_INPUT);
return;
}
@@ -8866,8 +8868,7 @@ delete_output_reload (rtx insn, int j, int last_reload_reg, rtx new_reload_reg)
since if they are the only uses, they are dead. */
if (set != 0 && SET_DEST (set) == reg)
continue;
- if (LABEL_P (i2)
- || JUMP_P (i2))
+ if (LABEL_P (i2) || JUMP_P (i2))
break;
if ((NONJUMP_INSN_P (i2) || CALL_P (i2))
&& reg_mentioned_p (reg, PATTERN (i2)))
@@ -8891,8 +8892,7 @@ delete_output_reload (rtx insn, int j, int last_reload_reg, rtx new_reload_reg)
delete_address_reloads (i2, insn);
delete_insn (i2);
}
- if (LABEL_P (i2)
- || JUMP_P (i2))
+ if (LABEL_P (i2) || JUMP_P (i2))
break;
}