diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-28 06:24:27 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-28 06:24:27 +0000 |
commit | 956816a2d68b0585af8a90283b68c2f9f41120ad (patch) | |
tree | 09debe30d0cb53a1873133e0ac379d655e8affcc /gcc/cfgcleanup.c | |
parent | db184797187e7be49f5226abd80d5161d3d9a5f1 (diff) | |
download | gcc-956816a2d68b0585af8a90283b68c2f9f41120ad.tar.gz |
gcc/
* rtl.h (replace_label_data): Delete.
(replace_label): Take the old label, new label and update-nuses flag
as direct arguments. Return void.
* cfgcleanup.c (outgoing_edges_match): Update accordingly.
* rtlanal.c (replace_label): Update interface as above. Handle
JUMP_TABLE_DATA as a special case. Handle JUMPs outside the
iterator. Use FOR_EACH_SUBRTX_PTR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214655 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 7dfed098eaf..a0081688753 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1719,15 +1719,11 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) if (identical) { - replace_label_data rr; bool match; /* Temporarily replace references to LABEL1 with LABEL2 in BB1->END so that we could compare the instructions. */ - rr.r1 = label1; - rr.r2 = label2; - rr.update_label_nuses = false; - for_each_rtx_in_insn (&BB_END (bb1), replace_label, &rr); + replace_label_in_insn (BB_END (bb1), label1, label2, false); match = (old_insns_match_p (mode, BB_END (bb1), BB_END (bb2)) == dir_both); @@ -1739,9 +1735,7 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) /* Set the original label in BB1->END because when deleting a block whose end is a tablejump, the tablejump referenced from the instruction is deleted too. */ - rr.r1 = label2; - rr.r2 = label1; - for_each_rtx_in_insn (&BB_END (bb1), replace_label, &rr); + replace_label_in_insn (BB_END (bb1), label2, label1, false); return match; } @@ -1988,20 +1982,16 @@ try_crossjump_to_edge (int mode, edge e1, edge e2, && tablejump_p (BB_END (osrc2), &label2, &table2) && label1 != label2) { - replace_label_data rr; rtx_insn *insn; /* Replace references to LABEL1 with LABEL2. */ - rr.r1 = label1; - rr.r2 = label2; - rr.update_label_nuses = true; for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) { /* Do not replace the label in SRC1->END because when deleting a block whose end is a tablejump, the tablejump referenced from the instruction is deleted too. */ if (insn != BB_END (osrc1)) - for_each_rtx_in_insn (&insn, replace_label, &rr); + replace_label_in_insn (insn, label1, label2, true); } } } |