Commit 748ebfc7 by J"orn Rennecke Committed by Joern Rennecke

optabs.c (emit_libcall_block): Use no_conflict_move_test.

	* optabs.c (emit_libcall_block): Use no_conflict_move_test.
	(no_conflict_move_test): Update comments.

From-SVN: r104563
parent 9617ccfd
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
* optabs.c (no_conflict_move_test): Don't set must_stay for a * optabs.c (no_conflict_move_test): Don't set must_stay for a
clobber / clobber match between dest and p->first. clobber / clobber match between dest and p->first.
* optabs.c (emit_libcall_block): Use no_conflict_move_test.
(no_conflict_move_test): Update comments.
2005-09-22 Ranjit Mathew <rmathew@gcc.gnu.org> 2005-09-22 Ranjit Mathew <rmathew@gcc.gnu.org>
* doc/install.texi: Update URL for Jacks. * doc/install.texi: Update URL for Jacks.
......
...@@ -3004,9 +3004,10 @@ struct no_conflict_data ...@@ -3004,9 +3004,10 @@ struct no_conflict_data
bool must_stay; bool must_stay;
}; };
/* Called via note_stores by emit_no_conflict_block. Set P->must_stay /* Called via note_stores by emit_no_conflict_block and emit_libcall_block.
if the currently examined clobber / store has to stay in the list of Set P->must_stay if the currently examined clobber / store has to stay
insns that constitute the actual no_conflict block. */ in the list of insns that constitute the actual no_conflict block /
libcall block. */
static void static void
no_conflict_move_test (rtx dest, rtx set, void *p0) no_conflict_move_test (rtx dest, rtx set, void *p0)
{ {
...@@ -3248,13 +3249,16 @@ emit_libcall_block (rtx insns, rtx target, rtx result, rtx equiv) ...@@ -3248,13 +3249,16 @@ emit_libcall_block (rtx insns, rtx target, rtx result, rtx equiv)
next = NEXT_INSN (insn); next = NEXT_INSN (insn);
if (set != 0 && REG_P (SET_DEST (set)) if (set != 0 && REG_P (SET_DEST (set))
&& REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER && REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER)
&& (insn == insns {
|| ((! INSN_P(insns) struct no_conflict_data data;
|| ! reg_mentioned_p (SET_DEST (set), PATTERN (insns)))
&& ! reg_used_between_p (SET_DEST (set), insns, insn) data.target = const0_rtx;
&& ! modified_in_p (SET_SRC (set), insns) data.first = insns;
&& ! modified_between_p (SET_SRC (set), insns, insn)))) data.insn = insn;
data.must_stay = 0;
note_stores (PATTERN (insn), no_conflict_move_test, &data);
if (! data.must_stay)
{ {
if (PREV_INSN (insn)) if (PREV_INSN (insn))
NEXT_INSN (PREV_INSN (insn)) = next; NEXT_INSN (PREV_INSN (insn)) = next;
...@@ -3266,6 +3270,7 @@ emit_libcall_block (rtx insns, rtx target, rtx result, rtx equiv) ...@@ -3266,6 +3270,7 @@ emit_libcall_block (rtx insns, rtx target, rtx result, rtx equiv)
add_insn (insn); add_insn (insn);
} }
}
/* Some ports use a loop to copy large arguments onto the stack. /* Some ports use a loop to copy large arguments onto the stack.
Don't move anything outside such a loop. */ Don't move anything outside such a loop. */
......
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