diff options
author | zadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-14 12:24:43 +0000 |
---|---|---|
committer | zadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-14 12:24:43 +0000 |
commit | e29831db862269fb7862eae56b51642cae279f44 (patch) | |
tree | 1b9cd90a2e69bb7ed2a67500e6e2e2262544cf81 /gcc/optabs.c | |
parent | b5264126ac1332b9cbb672c2f99c7b039067bad9 (diff) | |
download | gcc-e29831db862269fb7862eae56b51642cae279f44.tar.gz |
2008-05-14 Kenneth Zadeck <zadeck@naturalbridge.com>
* doc/rtl.texi: Removed reference to REG_NO_CONFLICT notes.
* optabs.c (expand_binop, expand_absneg_bit, expand_unop,
expand_copysign_bit, ): Change call to emit_no_conflict_block to
emit_insn and remove unneeded code to construct extra args.
(emit_no_conflict_block): Removed.
* optabls.h: (emit_no_conflict_block): Removed.
* cse.c (cse_extended_basic_block): Remove search for
REG_NO_CONFLICT note.
* global.c: Removed incorrect comment added in revision 117.
* expr.c (convert_move): Change call to emit_no_conflict_block to
emit_insn.
* recog.c: Change comments so that they do not mention
REG_NO_CONFLICT.
* local_alloc.c (combine_regs): Removed last parameter.
(no_conflict_p): Removed.
(block_alloc): Removed note, no_conflict_combined_regno and set
local vars. Removed all code to process REG_NO_CONFLICT blocks.
(combine_regs): Removed already_dead and code to look for
REG_NO_CONFLICT notes.
* lower_subreg (remove_retval_note): Removed code to look for
REG_NO_CONFLICT block.
(resolve_reg_notes): Removed REG_NO_CONFLICT case.
(resolve_clobber): Remove code to process libcalls that have
REG_NO_CONFLICT notes.
* loop_invariant.c (find_invariant_insn): Removed REG_NO_CONFLICT
case.
* combine.c (can_combine_p, distribute_notes): Removed REG_NO_CONFLICT
case.
* config/cris/cris.md (movdi pattern): Changed
emit_no_conflict_block to emit_insns.
* config/mn10300/mn10300.md (absdf2, negdf2 patterns): Ditto.
* config/m68k/m68k.md (negdf2, negxf2, absdf2, absxf2 patterns):
Ditto.
* reg-notes.def (NO_CONFLICT): Removed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135289 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 156 |
1 files changed, 10 insertions, 146 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 8978a975a41..0303c203823 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1151,8 +1151,7 @@ expand_doubleword_shift (enum machine_mode op1_mode, optab binoptab, If we want to multiply two two-word values and have normal and widening multiplies of single-word values, we can do this with three smaller - multiplications. Note that we do not make a REG_NO_CONFLICT block here - because we are not operating on one word at a time. + multiplications. The multiplication proceeds as follows: _______________________ @@ -1750,7 +1749,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, else equiv_value = 0; - emit_no_conflict_block (insns, target, op0, op1, equiv_value); + emit_insn (insns); return target; } } @@ -1785,7 +1784,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, || (shift_mask == BITS_PER_WORD - 1 && double_shift_mask == BITS_PER_WORD * 2 - 1)) { - rtx insns, equiv_value; + rtx insns; rtx into_target, outof_target; rtx into_input, outof_input; int left_shift, outof_word; @@ -1819,8 +1818,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, insns = get_insns (); end_sequence (); - equiv_value = gen_rtx_fmt_ee (binoptab->code, mode, op0, op1); - emit_no_conflict_block (insns, target, op0, op1, equiv_value); + emit_insn (insns); return target; } end_sequence (); @@ -1935,11 +1933,6 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, if (inter != 0) { - /* One may be tempted to wrap the insns in a REG_NO_CONFLICT - block to help the register allocator a bit. But a multi-word - rotate will need all the input bits when setting the output - bits, so there clearly is a conflict between the input and - output registers. So we can't use a no-conflict block here. */ emit_insn (insns); return target; } @@ -3012,8 +3005,7 @@ expand_absneg_bit (enum rtx_code code, enum machine_mode mode, insns = get_insns (); end_sequence (); - temp = gen_rtx_fmt_e (code, mode, copy_rtx (op0)); - emit_no_conflict_block (insns, target, op0, NULL_RTX, temp); + emit_insn (insns); } else { @@ -3213,9 +3205,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, insns = get_insns (); end_sequence (); - emit_no_conflict_block (insns, target, op0, NULL_RTX, - gen_rtx_fmt_e (unoptab->code, mode, - copy_rtx (op0))); + emit_insn (insns); return target; } @@ -3665,7 +3655,7 @@ expand_copysign_bit (enum machine_mode mode, rtx op0, rtx op1, rtx target, insns = get_insns (); end_sequence (); - emit_no_conflict_block (insns, target, op0, op1, NULL_RTX); + emit_insn (insns); } else { @@ -3777,10 +3767,9 @@ struct no_conflict_data bool must_stay; }; -/* 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. */ +/* Called via note_stores by 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 libcall block. */ static void no_conflict_move_test (rtx dest, const_rtx set, void *p0) { @@ -3844,131 +3833,6 @@ maybe_encapsulate_block (rtx first, rtx last, rtx equiv) } } -/* Emit code to perform a series of operations on a multi-word quantity, one - word at a time. - - Such a block is preceded by a CLOBBER of the output, consists of multiple - insns, each setting one word of the output, and followed by a SET copying - the output to itself. - - Each of the insns setting words of the output receives a REG_NO_CONFLICT - note indicating that it doesn't conflict with the (also multi-word) - inputs. The entire block is surrounded by REG_LIBCALL and REG_RETVAL - notes. - - INSNS is a block of code generated to perform the operation, not including - the CLOBBER and final copy. All insns that compute intermediate values - are first emitted, followed by the block as described above. - - TARGET, OP0, and OP1 are the output and inputs of the operations, - respectively. OP1 may be zero for a unary operation. - - EQUIV, if nonzero, is an expression to be placed into a REG_EQUAL note - on the last insn. - - If TARGET is not a register, INSNS is simply emitted with no special - processing. Likewise if anything in INSNS is not an INSN or if - there is a libcall block inside INSNS. - - The final insn emitted is returned. */ - -rtx -emit_no_conflict_block (rtx insns, rtx target, rtx op0, rtx op1, rtx equiv) -{ - rtx prev, next, first, last, insn; - - if (!REG_P (target) || reload_in_progress) - return emit_insn (insns); - else - for (insn = insns; insn; insn = NEXT_INSN (insn)) - if (!NONJUMP_INSN_P (insn) - || find_reg_note (insn, REG_LIBCALL, NULL_RTX)) - return emit_insn (insns); - - /* First emit all insns that do not store into words of the output and remove - these from the list. */ - for (insn = insns; insn; insn = next) - { - rtx note; - struct no_conflict_data data; - - next = NEXT_INSN (insn); - - /* Some ports (cris) create a libcall regions at their own. We must - avoid any potential nesting of LIBCALLs. */ - if ((note = find_reg_note (insn, REG_LIBCALL, NULL)) != NULL) - remove_note (insn, note); - if ((note = find_reg_note (insn, REG_RETVAL, NULL)) != NULL) - remove_note (insn, note); - - data.target = target; - 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); - - add_insn (insn); - } - } - - prev = get_last_insn (); - - /* Now write the CLOBBER of the output, followed by the setting of each - of the words, followed by the final copy. */ - if (target != op0 && target != op1) - emit_insn (gen_rtx_CLOBBER (VOIDmode, target)); - - for (insn = insns; insn; insn = next) - { - next = NEXT_INSN (insn); - add_insn (insn); - - if (op1 && REG_P (op1)) - REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_NO_CONFLICT, op1, - REG_NOTES (insn)); - - if (op0 && REG_P (op0)) - REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_NO_CONFLICT, op0, - REG_NOTES (insn)); - } - - if (optab_handler (mov_optab, GET_MODE (target))->insn_code - != CODE_FOR_nothing) - { - last = emit_move_insn (target, target); - if (equiv) - set_unique_reg_note (last, REG_EQUAL, equiv); - } - else - { - last = get_last_insn (); - - /* Remove any existing REG_EQUAL note from "last", or else it will - be mistaken for a note referring to the full contents of the - alleged libcall value when found together with the REG_RETVAL - note added below. An existing note can come from an insn - expansion at "last". */ - remove_note (last, find_reg_note (last, REG_EQUAL, NULL_RTX)); - } - - if (prev == 0) - first = get_insns (); - else - first = NEXT_INSN (prev); - - maybe_encapsulate_block (first, last, equiv); - - return last; -} /* Emit code to make a call to a constant function or a library call. |