diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-07-14 07:30:23 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-07-14 07:30:23 +0000 |
commit | ad76cef84c675f27d4e04284c1cf8c2b659d82ea (patch) | |
tree | 24070b8bb3608402594a7c1884532c74eaa969a8 /gcc/optabs.c | |
parent | 780028b6cff77a9f25f75a24047ab5f3b50a4834 (diff) | |
download | gcc-ad76cef84c675f27d4e04284c1cf8c2b659d82ea.tar.gz |
expr.c (enqueue_insn, [...]): Remove.
2004-07-14 Paolo Bonzini <bonzini@gnu.org>
* expr.c (enqueue_insn, finish_expr_for_function,
protect_from_queue, queued_subexp_p, mark_queue,
emit_insns_enqueued_after_mark, emit_queue,
expand_increment): Remove.
(store_constructor): Expand increment as an assignment.
(expand_expr_real_1 <case PREINCREMENT_EXPR,
case PREDECREMENT_EXPR, case POSTINCREMENT_EXPR,
case POSTDECREMENT_EXPR>): Abort.
* expr.h (QUEUED_VAR, QUEUED_INSN, QUEUED_COPY,
QUEUED_BODY, QUEUED_NEXT, finish_expr_for_function,
protect_from_queue, emit_queue, queued_subexp_p): Remove.
* function.h (pending_chain, x_pending_chain): Remove.
* rtl.def (QUEUED): Remove.
* emit-rtl.c (copy_insn_1, copy_most_rtx,
set_used_flags, verify_rtx_sharing): Remove references to QUEUED.
* genattrtab.c (attr_copy_rtx, clear_struct_flag,
encode_units_mask): Likewise.
* local-alloc.c (equiv_init_varies_p): Likewise.
* rtl.c (copy_rtx): Likewise.
* rtlanal.c (rtx_unstable_p, rtx_varies_p): Likewise.
* simplify-rtx.c (simplify_gen_subreg): Likewise.
* config/mn10300/mn10300.c (legitimate_pic_operand_p): Likewise.
* builtins.c (expand_builtin, expand_builtin_apply,
expand_builtin_mathfn, expand_builtin_mathfn_2,
expand_builtin_mathfn_3, expand_builtin_setjmp_setup):
Remove calls to emit_queue and protect_from_queue.
* calls.c (expand_call, precompute_arguments,
precompute_register_parameters, rtx_for_function_call,
store_one_arg): Likewise.
* dojump.c (do_compare_and_jump, do_jump): Likewise.
* explow.c (memory_address): Likewise.
* expmed.c (clear_by_pieces_1, clear_storage,
clear_storage_via_libcall, emit_group_load,
emit_group_store, emit_store_flag,
expand_expr_real_1, store_by_pieces,
store_constructor, store_expr, try_casesi,
try_tablejump): Likewise.
* function.c (expand_pending_sizes): Likewise.
* optabs.c (emit_cmp_and_jump_insns,
emit_conditional_add, emit_conditional_move,
expand_fix, expand_float, prepare_cmp_insn): Likewise.
* stmt.c (emit_case_bit_tests,
expand_asm_expr, expand_computed_goto,
expand_decl_init, expand_end_case_type,
expand_end_stmt_expr, expand_expr_stmt_value,
expand_return, expand_start_case,
optimize_tail_recursion): Likewise.
* config/c4x/c4x.c (c4x_expand_builtin): Likewise.
* config/s390/s390.c (s390_expand_cmpmem): Likewise.
From-SVN: r84675
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 115 |
1 files changed, 16 insertions, 99 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 041ec928f15..2440a86dc94 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -675,11 +675,6 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, class = GET_MODE_CLASS (mode); - op0 = protect_from_queue (op0, 0); - op1 = protect_from_queue (op1, 0); - if (target) - target = protect_from_queue (target, 1); - if (flag_force_mem) { /* Load duplicate non-volatile operands once. */ @@ -2168,20 +2163,12 @@ expand_twoval_unop (optab unoptab, rtx op0, rtx targ0, rtx targ1, class = GET_MODE_CLASS (mode); - op0 = protect_from_queue (op0, 0); - if (flag_force_mem) - { - op0 = force_not_mem (op0); - } + op0 = force_not_mem (op0); - if (targ0) - targ0 = protect_from_queue (targ0, 1); - else + if (!targ0) targ0 = gen_reg_rtx (mode); - if (targ1) - targ1 = protect_from_queue (targ1, 1); - else + if (!targ1) targ1 = gen_reg_rtx (mode); /* Record where to go back to if we fail. */ @@ -2272,9 +2259,6 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1, class = GET_MODE_CLASS (mode); - op0 = protect_from_queue (op0, 0); - op1 = protect_from_queue (op1, 0); - if (flag_force_mem) { op0 = force_not_mem (op0); @@ -2291,13 +2275,9 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1, && rtx_cost (op1, binoptab->code) > COSTS_N_INSNS (1)) op1 = force_reg (mode, op1); - if (targ0) - targ0 = protect_from_queue (targ0, 1); - else + if (!targ0) targ0 = gen_reg_rtx (mode); - if (targ1) - targ1 = protect_from_queue (targ1, 1); - else + if (!targ1) targ1 = gen_reg_rtx (mode); /* Record where to go back to if we fail. */ @@ -2500,15 +2480,8 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, class = GET_MODE_CLASS (mode); - op0 = protect_from_queue (op0, 0); - if (flag_force_mem) - { - op0 = force_not_mem (op0); - } - - if (target) - target = protect_from_queue (target, 1); + op0 = force_not_mem (op0); if (unoptab->handlers[(int) mode].insn_code != CODE_FOR_nothing) { @@ -3037,18 +3010,11 @@ expand_complex_abs (enum machine_mode mode, rtx op0, rtx target, if (submode == BLKmode) abort (); - op0 = protect_from_queue (op0, 0); - if (flag_force_mem) - { - op0 = force_not_mem (op0); - } + op0 = force_not_mem (op0); last = get_last_insn (); - if (target) - target = protect_from_queue (target, 1); - this_abs_optab = ! unsignedp && flag_trapv && (GET_MODE_CLASS(mode) == MODE_INT) ? absv_optab : abs_optab; @@ -3223,9 +3189,7 @@ emit_unop_insn (int icode, rtx target, rtx op0, enum rtx_code code) enum machine_mode mode0 = insn_data[icode].operand[1].mode; rtx pat; - temp = target = protect_from_queue (target, 1); - - op0 = protect_from_queue (op0, 0); + temp = target; /* Sign and zero extension from memory is often done specially on RISC machines, so forcing into a register here can pessimize @@ -3707,11 +3671,6 @@ prepare_cmp_insn (rtx *px, rtx *py, enum rtx_code *pcomparison, rtx size, if (size == 0) abort (); - emit_queue (); - x = protect_from_queue (x, 0); - y = protect_from_queue (y, 0); - size = protect_from_queue (size, 0); - /* Try to use a memory block compare insn - either cmpstr or cmpmem will do. */ for (cmp_mode = GET_CLASS_NARROWEST_MODE (MODE_INT); @@ -3816,8 +3775,6 @@ rtx prepare_operand (int icode, rtx x, int opnum, enum machine_mode mode, enum machine_mode wider_mode, int unsignedp) { - x = protect_from_queue (x, 0); - if (mode != wider_mode) x = convert_modes (wider_mode, mode, x, unsignedp); @@ -3943,7 +3900,6 @@ emit_cmp_and_jump_insns (rtx x, rtx y, enum rtx_code comparison, rtx size, op0 = force_reg (mode, op0); #endif - emit_queue (); if (unsignedp) comparison = unsigned_condition (comparison); @@ -3970,8 +3926,8 @@ prepare_float_lib_cmp (rtx *px, rtx *py, enum rtx_code *pcomparison, { enum rtx_code comparison = *pcomparison; enum rtx_code swapped = swap_condition (comparison); - rtx x = protect_from_queue (*px, 0); - rtx y = protect_from_queue (*py, 0); + rtx x = *px; + rtx y = *py; enum machine_mode orig_mode = GET_MODE (x); enum machine_mode mode; rtx value, target, insns, equiv; @@ -4162,18 +4118,11 @@ emit_conditional_move (rtx target, enum rtx_code code, rtx op0, rtx op1, op3 = force_not_mem (op3); } - if (target) - target = protect_from_queue (target, 1); - else + if (!target) target = gen_reg_rtx (mode); subtarget = target; - emit_queue (); - - op2 = protect_from_queue (op2, 0); - op3 = protect_from_queue (op3, 0); - /* If the insn doesn't accept these operands, put them in pseudos. */ if (! (*insn_data[icode].operand[0].predicate) @@ -4303,23 +4252,16 @@ emit_conditional_add (rtx target, enum rtx_code code, rtx op0, rtx op1, op3 = force_not_mem (op3); } - if (target) - target = protect_from_queue (target, 1); - else + if (!target) target = gen_reg_rtx (mode); - subtarget = target; - - emit_queue (); - - op2 = protect_from_queue (op2, 0); - op3 = protect_from_queue (op3, 0); - /* If the insn doesn't accept these operands, put them in pseudos. */ if (! (*insn_data[icode].operand[0].predicate) - (subtarget, insn_data[icode].operand[0].mode)) + (target, insn_data[icode].operand[0].mode)) subtarget = gen_reg_rtx (insn_data[icode].operand[0].mode); + else + subtarget = target; if (! (*insn_data[icode].operand[2].predicate) (op2, insn_data[icode].operand[2].mode)) @@ -4358,11 +4300,7 @@ emit_conditional_add (rtx target, enum rtx_code code, rtx op0, rtx op1, /* These functions attempt to generate an insn body, rather than emitting the insn, but if the gen function already emits them, we - make no attempt to turn them back into naked patterns. - - They do not protect from queued increments, - because they may be used 1) in protect_from_queue itself - and 2) in other passes where there is no queue. */ + make no attempt to turn them back into naked patterns. */ /* Generate and return an insn body to add Y to X. */ @@ -4619,9 +4557,6 @@ expand_float (rtx to, rtx from, int unsignedp) if (icode != CODE_FOR_nothing) { - to = protect_from_queue (to, 1); - from = protect_from_queue (from, 0); - if (imode != GET_MODE (from)) from = convert_to_mode (imode, from, unsignedp); @@ -4645,11 +4580,6 @@ expand_float (rtx to, rtx from, int unsignedp) rtx temp; REAL_VALUE_TYPE offset; - emit_queue (); - - to = protect_from_queue (to, 1); - from = protect_from_queue (from, 0); - if (flag_force_mem) from = force_not_mem (from); @@ -4757,9 +4687,6 @@ expand_float (rtx to, rtx from, int unsignedp) rtx value; convert_optab tab = unsignedp ? ufloat_optab : sfloat_optab; - to = protect_from_queue (to, 1); - from = protect_from_queue (from, 0); - if (GET_MODE_SIZE (GET_MODE (from)) < GET_MODE_SIZE (SImode)) from = convert_to_mode (SImode, from, unsignedp); @@ -4825,9 +4752,6 @@ expand_fix (rtx to, rtx from, int unsignedp) if (icode != CODE_FOR_nothing) { - to = protect_from_queue (to, 1); - from = protect_from_queue (from, 0); - if (fmode != GET_MODE (from)) from = convert_to_mode (fmode, from, 0); @@ -4887,10 +4811,6 @@ expand_fix (rtx to, rtx from, int unsignedp) lab1 = gen_label_rtx (); lab2 = gen_label_rtx (); - emit_queue (); - to = protect_from_queue (to, 1); - from = protect_from_queue (from, 0); - if (flag_force_mem) from = force_not_mem (from); @@ -4961,9 +4881,6 @@ expand_fix (rtx to, rtx from, int unsignedp) if (!libfunc) abort (); - to = protect_from_queue (to, 1); - from = protect_from_queue (from, 0); - if (flag_force_mem) from = force_not_mem (from); |