summaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-19 19:19:13 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-19 19:19:13 +0000
commitc86d86fffe04e33c7ac084e575b0298069b8e8f8 (patch)
tree25dcbcad495942e5f4d89b95ad979a56367bd84f /gcc/cfgcleanup.c
parent78bf41568c66b61419865b36f101121c8f5918a5 (diff)
downloadgcc-c86d86fffe04e33c7ac084e575b0298069b8e8f8.tar.gz
Make tablejump_p accept a rtx_jump_table_data **
2014-08-19 David Malcolm <dmalcolm@redhat.com> * 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 rtx_jump_table_data *. * cfgcleanup.c (merge_blocks_move_successor_nojumps): Likewise. (outgoing_edges_match): Likewise for locals "table1" and "table2". (try_crossjump_to_edge): Likewise. * cfgrtl.c (try_redirect_by_replacing_jump): Likewise for local "table". (patch_jump_insn): Introduce local "table", using it in place of "tmp" for jump table data. (force_nonfallthru_and_redirect): Introduce local "table", so that call to tablejump_p can receive an rtx_jump_table_data **. Update logic around the call to overwrite "note" appropriately if tablejump_p returns non-zero. (get_last_bb_insn): Introduce local "table", using it in place of "tmp" for jump table data. * dwarf2cfi.c (create_trace_edges): Likewise. * config/arm/arm.c (get_jump_table_size): Strengthen param "insn" from rtx to rtx_jump_table_data *. (create_fix_barrier): Strengthen local "tmp" from rtx to rtx_jump_table_data *. (arm_reorg): Likewise for local "table". * config/s390/s390.c (s390_chunkify_start): Likewise. * config/spu/spu.c (spu_emit_branch_hint): Likewise. * jump.c (delete_related_insns): Strengthen local "lab_next" from rtx to rtx_jump_table_data *. * rtlanal.c (tablejump_p): Strengthen param "tablep" from rtx * to rtx_jump_table_data **. Add a checked cast when writing through the pointer: we know there that local "table" is non-NULL and that JUMP_TABLE_DATA_P (table) holds. (label_is_jump_target_p): Introduce local "table", using it in place of "tmp" for jump table data. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214184 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index d6d4bc04ebe..9f43912320d 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -704,7 +704,8 @@ static void
merge_blocks_move_successor_nojumps (basic_block a, basic_block b)
{
rtx barrier, real_b_end;
- rtx label, table;
+ rtx label;
+ rtx_jump_table_data *table;
/* If we are partitioning hot/cold basic blocks, we don't want to
mess up unconditional or indirect jumps that cross between hot
@@ -1675,7 +1676,7 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2)
Return true if they are identical. */
{
rtx label1, label2;
- rtx table1, table2;
+ rtx_jump_table_data *table1, *table2;
if (tablejump_p (BB_END (bb1), &label1, &table1)
&& tablejump_p (BB_END (bb2), &label2, &table2)
@@ -1978,7 +1979,7 @@ try_crossjump_to_edge (int mode, edge e1, edge e2,
so replace the references to TABLE1 by references to TABLE2. */
{
rtx label1, label2;
- rtx table1, table2;
+ rtx_jump_table_data *table1, *table2;
if (tablejump_p (BB_END (osrc1), &label1, &table1)
&& tablejump_p (BB_END (osrc2), &label2, &table2)