summaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-28 13:01:41 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-28 13:01:41 +0000
commit06786d0d6d646c796d32db01c7ab7e96b38f5ab6 (patch)
treefcfa9d6d66c718191ab999fbc66e7dd5f6db4cc4 /gcc/loop.c
parent1fdf6039a543331eeabe2198b36e89fd0a3bd06d (diff)
downloadgcc-06786d0d6d646c796d32db01c7ab7e96b38f5ab6.tar.gz
* gcse.c (replace_store_insn): Use delete_insn.
* loop.c (move_movables): Likewise; avoid delete_insn from clobbering notes moved elsewhere. (check_dbra_loop): Use delete_insn. * ssa.c (convert_from_ssa): Likewise. * cse.c (cse_insn): Use delete_insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45859 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 601828a666d..d38741a031b 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -1772,7 +1772,7 @@ move_movables (loop, movables, threshold, insn_count)
= gen_rtx_EXPR_LIST (VOIDmode, r1,
gen_rtx_EXPR_LIST (VOIDmode, r2,
regs_may_share));
- delete_related_insns (m->insn);
+ delete_insn (m->insn);
if (new_start == 0)
new_start = i1;
@@ -1803,11 +1803,11 @@ move_movables (loop, movables, threshold, insn_count)
{
temp = XEXP (temp, 0);
while (temp != p)
- temp = delete_related_insns (temp);
+ temp = delete_insn (temp);
}
temp = p;
- p = delete_related_insns (p);
+ p = delete_insn (p);
/* simplify_giv_expr expects that it can walk the insns
at m->insn forwards and see this old sequence we are
@@ -1934,7 +1934,8 @@ move_movables (loop, movables, threshold, insn_count)
if (temp == fn_address_insn)
fn_address_insn = i1;
REG_NOTES (i1) = REG_NOTES (temp);
- delete_related_insns (temp);
+ REG_NOTES (temp) = NULL;
+ delete_insn (temp);
}
if (new_start == 0)
new_start = first;
@@ -1999,6 +2000,7 @@ move_movables (loop, movables, threshold, insn_count)
if (REG_NOTES (i1) == 0)
{
REG_NOTES (i1) = REG_NOTES (p);
+ REG_NOTES (p) = NULL;
/* If there is a REG_EQUAL note present whose value
is not loop invariant, then delete it, since it
@@ -2029,7 +2031,7 @@ move_movables (loop, movables, threshold, insn_count)
}
temp = p;
- delete_related_insns (p);
+ delete_insn (p);
p = NEXT_INSN (p);
/* simplify_giv_expr expects that it can walk the insns
@@ -2101,16 +2103,12 @@ move_movables (loop, movables, threshold, insn_count)
and prevent further processing of it. */
m1->done = 1;
- /* if library call, delete all insn except last, which
- is deleted below */
+ /* if library call, delete all insns. */
if ((temp = find_reg_note (m1->insn, REG_RETVAL,
NULL_RTX)))
- {
- for (temp = XEXP (temp, 0); temp != m1->insn;
- temp = NEXT_INSN (temp))
- delete_related_insns (temp);
- }
- delete_related_insns (m1->insn);
+ delete_insn_chain (XEXP (temp, 0), m1->insn);
+ else
+ delete_insn (m1->insn);
/* Any other movable that loads the same register
MUST be moved. */
@@ -7626,7 +7624,7 @@ check_dbra_loop (loop, insn_count)
end_sequence ();
p = loop_insn_emit_before (loop, 0, bl->biv->insn, tem);
- delete_related_insns (bl->biv->insn);
+ delete_insn (bl->biv->insn);
/* Update biv info to reflect its new status. */
bl->biv->insn = p;