diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-08-28 06:24:27 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-08-28 06:24:27 +0000 |
commit | a2b7026c2e31369f7b1d63f4ba3b71cefed64268 (patch) | |
tree | 09debe30d0cb53a1873133e0ac379d655e8affcc /gcc/cfgcleanup.c | |
parent | e08cf836163a847ddfa4ffb8514a16be6d747dff (diff) | |
download | gcc-a2b7026c2e31369f7b1d63f4ba3b71cefed64268.zip gcc-a2b7026c2e31369f7b1d63f4ba3b71cefed64268.tar.gz gcc-a2b7026c2e31369f7b1d63f4ba3b71cefed64268.tar.bz2 |
rtl.h (replace_label_data): Delete.
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.
From-SVN: r214655
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 7dfed09..a008168 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); } } } |