diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-23 12:13:07 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-23 12:13:07 +0000 |
commit | 536e04fbc9c2a86993a664fa3d586590aabdb006 (patch) | |
tree | 2cefe51ddfefada35befe678bc21db0925888586 /gcc/optabs.c | |
parent | 71fceab6594e18e87d3d751e90034fb8e1b019cc (diff) | |
download | gcc-536e04fbc9c2a86993a664fa3d586590aabdb006.tar.gz |
* optabs.c (emit_libcall_block): Use no_conflict_move_test.
(no_conflict_move_test): Update comments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104563 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 5da604d6e27..7ca39167390 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -3004,9 +3004,10 @@ struct no_conflict_data bool must_stay; }; -/* Called via note_stores by emit_no_conflict_block. Set P->must_stay - if the currently examined clobber / store has to stay in the list of - insns that constitute the actual no_conflict block. */ +/* Called via note_stores by emit_no_conflict_block and emit_libcall_block. + Set P->must_stay if the currently examined clobber / store has to stay + in the list of insns that constitute the actual no_conflict block / + libcall block. */ static void no_conflict_move_test (rtx dest, rtx set, void *p0) { @@ -3248,23 +3249,27 @@ emit_libcall_block (rtx insns, rtx target, rtx result, rtx equiv) next = NEXT_INSN (insn); if (set != 0 && REG_P (SET_DEST (set)) - && REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER - && (insn == insns - || ((! INSN_P(insns) - || ! reg_mentioned_p (SET_DEST (set), PATTERN (insns))) - && ! reg_used_between_p (SET_DEST (set), insns, insn) - && ! modified_in_p (SET_SRC (set), insns) - && ! modified_between_p (SET_SRC (set), insns, insn)))) + && REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER) { - if (PREV_INSN (insn)) - NEXT_INSN (PREV_INSN (insn)) = next; - else - insns = next; + struct no_conflict_data data; + + data.target = const0_rtx; + data.first = insns; + data.insn = insn; + data.must_stay = 0; + note_stores (PATTERN (insn), no_conflict_move_test, &data); + if (! data.must_stay) + { + if (PREV_INSN (insn)) + NEXT_INSN (PREV_INSN (insn)) = next; + else + insns = next; - if (next) - PREV_INSN (next) = PREV_INSN (insn); + if (next) + PREV_INSN (next) = PREV_INSN (insn); - add_insn (insn); + add_insn (insn); + } } /* Some ports use a loop to copy large arguments onto the stack. |