diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-03-10 07:41:54 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-03-10 07:41:54 -0500 |
commit | d674b9e395cf36d357c07a2edfe2b239668f3006 (patch) | |
tree | 7fdb16c887f825cd8b11a93126831d62f9b8e825 /gcc | |
parent | db5dc21f767db6d18eed651aec203ae1f30c4f44 (diff) | |
download | gcc-d674b9e395cf36d357c07a2edfe2b239668f3006.zip gcc-d674b9e395cf36d357c07a2edfe2b239668f3006.tar.gz gcc-d674b9e395cf36d357c07a2edfe2b239668f3006.tar.bz2 |
*** empty log message ***
From-SVN: r426
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/reorg.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c index b750528..c9f3346 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -2674,7 +2674,7 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely, int own_thread, own_opposite_thread; int slots_to_fill, *pslots_filled; { - rtx new_thread = thread; + rtx new_thread; rtx delay_list = 0; struct resources opposite_needed, set, needed; rtx trial; @@ -2698,6 +2698,12 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely, else mark_target_live_regs (opposite_thread, &opposite_needed); + /* If the insn at THREAD can be split, do it here to avoid having to + update THREAD and NEW_THREAD if it is done in the loop below. Also + initialize NEW_THREAD. */ + + new_thread = thread = try_split (PATTERN (thread), thread); + /* Scan insns at THREAD. We are looking for an insn that can be removed from THREAD (it neither sets nor references resources that were set ahead of it and it doesn't set anything needs by the insns ahead of @@ -2895,7 +2901,8 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely, /* If we haven't found anything for this delay slot and it is very likely that the branch will be taken, see if the insn at our target - increments or decrements a register. If so, try to place the opposite + increments or decrements a register with an increment that does not + depend on the destination register. If so, try to place the opposite arithmetic insn after the jump insn and put the arithmetic insn in the delay slot. If we can't do this, return. */ if (delay_list == 0 && likely && new_thread && GET_CODE (new_thread) == INSN) @@ -2904,7 +2911,7 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely, rtx dest; rtx src; - trial = try_split (pat, new_thread, 0); + trial = new_thread; pat = PATTERN (trial); if (GET_CODE (trial) != INSN || GET_CODE (pat) != SET @@ -2913,7 +2920,8 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely, dest = SET_DEST (pat), src = SET_SRC (pat); if ((GET_CODE (src) == PLUS || GET_CODE (src) == MINUS) - && rtx_equal_p (XEXP (src, 0), dest)) + && rtx_equal_p (XEXP (src, 0), dest) + && ! reg_overlap_mentioned_p (dest, XEXP (src, 1))) { rtx other = XEXP (src, 1); rtx new_arith; |