Commit 49ce134f by Jan Hubicka Committed by Jan Hubicka

gcse.c (replace_store_insn): Use delete_insn.

	* 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.

From-SVN: r45859
parent ece54d54
Fri Sep 28 14:59:34 CEST 2001 Jan Hubicka <jh@suse.cz>
* 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.
2001-09-28 Neil Booth <neil@daikokuya.demon.co.uk> 2001-09-28 Neil Booth <neil@daikokuya.demon.co.uk>
* cpphash.h (struct cpp_buff): Make unsigned. * cpphash.h (struct cpp_buff): Make unsigned.
......
...@@ -5763,11 +5763,7 @@ cse_insn (insn, libcall_insn) ...@@ -5763,11 +5763,7 @@ cse_insn (insn, libcall_insn)
else if (n_sets == 1 && dest == pc_rtx && src == pc_rtx) else if (n_sets == 1 && dest == pc_rtx && src == pc_rtx)
{ {
/* One less use of the label this insn used to jump to. */ /* One less use of the label this insn used to jump to. */
if (JUMP_LABEL (insn) != 0) delete_insn (insn);
--LABEL_NUSES (JUMP_LABEL (insn));
PUT_CODE (insn, NOTE);
NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
NOTE_SOURCE_FILE (insn) = 0;
cse_jumps_altered = 1; cse_jumps_altered = 1;
/* No more processing for this set. */ /* No more processing for this set. */
sets[i].rtl = 0; sets[i].rtl = 0;
...@@ -6310,11 +6306,7 @@ cse_insn (insn, libcall_insn) ...@@ -6310,11 +6306,7 @@ cse_insn (insn, libcall_insn)
&& (tem = single_set (prev_insn)) != 0 && (tem = single_set (prev_insn)) != 0
&& SET_DEST (tem) == cc0_rtx && SET_DEST (tem) == cc0_rtx
&& ! reg_mentioned_p (cc0_rtx, x)) && ! reg_mentioned_p (cc0_rtx, x))
{ delete-insn (prev_insn);
PUT_CODE (prev_insn, NOTE);
NOTE_LINE_NUMBER (prev_insn) = NOTE_INSN_DELETED;
NOTE_SOURCE_FILE (prev_insn) = 0;
}
prev_insn_cc0 = this_insn_cc0; prev_insn_cc0 = this_insn_cc0;
prev_insn_cc0_mode = this_insn_cc0_mode; prev_insn_cc0_mode = this_insn_cc0_mode;
......
...@@ -6834,7 +6834,7 @@ replace_store_insn (reg, del, bb) ...@@ -6834,7 +6834,7 @@ replace_store_insn (reg, del, bb)
fprintf(gcse_file, "\n"); fprintf(gcse_file, "\n");
} }
delete_related_insns (del); delete_insn (del);
} }
......
...@@ -1772,7 +1772,7 @@ move_movables (loop, movables, threshold, insn_count) ...@@ -1772,7 +1772,7 @@ move_movables (loop, movables, threshold, insn_count)
= gen_rtx_EXPR_LIST (VOIDmode, r1, = gen_rtx_EXPR_LIST (VOIDmode, r1,
gen_rtx_EXPR_LIST (VOIDmode, r2, gen_rtx_EXPR_LIST (VOIDmode, r2,
regs_may_share)); regs_may_share));
delete_related_insns (m->insn); delete_insn (m->insn);
if (new_start == 0) if (new_start == 0)
new_start = i1; new_start = i1;
...@@ -1803,11 +1803,11 @@ move_movables (loop, movables, threshold, insn_count) ...@@ -1803,11 +1803,11 @@ move_movables (loop, movables, threshold, insn_count)
{ {
temp = XEXP (temp, 0); temp = XEXP (temp, 0);
while (temp != p) while (temp != p)
temp = delete_related_insns (temp); temp = delete_insn (temp);
} }
temp = p; temp = p;
p = delete_related_insns (p); p = delete_insn (p);
/* simplify_giv_expr expects that it can walk the insns /* simplify_giv_expr expects that it can walk the insns
at m->insn forwards and see this old sequence we are at m->insn forwards and see this old sequence we are
...@@ -1934,7 +1934,8 @@ move_movables (loop, movables, threshold, insn_count) ...@@ -1934,7 +1934,8 @@ move_movables (loop, movables, threshold, insn_count)
if (temp == fn_address_insn) if (temp == fn_address_insn)
fn_address_insn = i1; fn_address_insn = i1;
REG_NOTES (i1) = REG_NOTES (temp); REG_NOTES (i1) = REG_NOTES (temp);
delete_related_insns (temp); REG_NOTES (temp) = NULL;
delete_insn (temp);
} }
if (new_start == 0) if (new_start == 0)
new_start = first; new_start = first;
...@@ -1999,6 +2000,7 @@ move_movables (loop, movables, threshold, insn_count) ...@@ -1999,6 +2000,7 @@ move_movables (loop, movables, threshold, insn_count)
if (REG_NOTES (i1) == 0) if (REG_NOTES (i1) == 0)
{ {
REG_NOTES (i1) = REG_NOTES (p); REG_NOTES (i1) = REG_NOTES (p);
REG_NOTES (p) = NULL;
/* If there is a REG_EQUAL note present whose value /* If there is a REG_EQUAL note present whose value
is not loop invariant, then delete it, since it is not loop invariant, then delete it, since it
...@@ -2029,7 +2031,7 @@ move_movables (loop, movables, threshold, insn_count) ...@@ -2029,7 +2031,7 @@ move_movables (loop, movables, threshold, insn_count)
} }
temp = p; temp = p;
delete_related_insns (p); delete_insn (p);
p = NEXT_INSN (p); p = NEXT_INSN (p);
/* simplify_giv_expr expects that it can walk the insns /* simplify_giv_expr expects that it can walk the insns
...@@ -2101,16 +2103,12 @@ move_movables (loop, movables, threshold, insn_count) ...@@ -2101,16 +2103,12 @@ move_movables (loop, movables, threshold, insn_count)
and prevent further processing of it. */ and prevent further processing of it. */
m1->done = 1; m1->done = 1;
/* if library call, delete all insn except last, which /* if library call, delete all insns. */
is deleted below */
if ((temp = find_reg_note (m1->insn, REG_RETVAL, if ((temp = find_reg_note (m1->insn, REG_RETVAL,
NULL_RTX))) NULL_RTX)))
{ delete_insn_chain (XEXP (temp, 0), m1->insn);
for (temp = XEXP (temp, 0); temp != m1->insn; else
temp = NEXT_INSN (temp)) delete_insn (m1->insn);
delete_related_insns (temp);
}
delete_related_insns (m1->insn);
/* Any other movable that loads the same register /* Any other movable that loads the same register
MUST be moved. */ MUST be moved. */
...@@ -7626,7 +7624,7 @@ check_dbra_loop (loop, insn_count) ...@@ -7626,7 +7624,7 @@ check_dbra_loop (loop, insn_count)
end_sequence (); end_sequence ();
p = loop_insn_emit_before (loop, 0, bl->biv->insn, tem); 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. */ /* Update biv info to reflect its new status. */
bl->biv->insn = p; bl->biv->insn = p;
......
...@@ -2186,7 +2186,7 @@ convert_from_ssa() ...@@ -2186,7 +2186,7 @@ convert_from_ssa()
{ {
if (insn == BLOCK_END (bb)) if (insn == BLOCK_END (bb))
BLOCK_END (bb) = PREV_INSN (insn); BLOCK_END (bb) = PREV_INSN (insn);
insn = delete_related_insns (insn); insn = delete_insn (insn);
} }
/* Since all the phi nodes come at the beginning of the /* Since all the phi nodes come at the beginning of the
block, if we find an ordinary insn, we can stop looking block, if we find an ordinary insn, we can stop looking
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment