aboutsummaryrefslogtreecommitdiff
path: root/gcc/unroll.c
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2001-08-18 19:59:46 +0000
committerZack Weinberg <zack@gcc.gnu.org>2001-08-18 19:59:46 +0000
commitef89d648b84b126fe6c15be5b09105bf705aa60a (patch)
treef45f62817a1ba4ec89643d51d48fc4dea2c0237b /gcc/unroll.c
parent8d36d7229213f91138844f0e710e68c185774aea (diff)
downloadgcc-ef89d648b84b126fe6c15be5b09105bf705aa60a.zip
gcc-ef89d648b84b126fe6c15be5b09105bf705aa60a.tar.gz
gcc-ef89d648b84b126fe6c15be5b09105bf705aa60a.tar.bz2
optabs.h (OTI_flodiv, [...]): Kill.
* optabs.h (OTI_flodiv, flodiv_optab): Kill. * genopinit.c: Put floating point divide insns in sdiv_optab. * expr.c (expand_expr): Use sdiv_optab, not flodiv_optab. * config/gofast.h, config/c4x/c4x.h, config/ia64/hpux_longdouble.h, config/mips/mips.h, config/pa/long_double.h, config/rs6000/sysv4.h, config/sparc/sparc.h: Put floating point divide libcalls in sdiv_optab. * optabs.c (init_optab): Break into new_optab, init_optab, init_optabv. (init_optabs): Use init_optabv for overflow-trapping optabs. Don't init flodiv_optab. Give mov_optab, movstrict_optab, and cmp_optab RTX codes so have_insn_for can find them. * optabs.c (expand_simple_binop, expand_simple_unop, have_insn_for, gen_sub3_insn): New interfaces. * expr.h: Prototype new functions. (enum optab_methods): Move here from optabs.h. * builtins.c, combine.c, doloop.c, function.c, ifcvt.c, loop.c, profile.c, simplify-rtx.c, stmt.c, unroll.c: Use new functions instead of working directly with optabs. * doloop.c, ifcvt.c, loop.c, profile.c, simplify-rtx.c, unroll.c: Don't include optabs.h. * caller-save.c, combine.c, function.c, stmt.c: Just include insn-codes.h, not optabs.h. * Makefile.in: Update dependencies. * combine.c (make_compound_operation, simplify_comparison): Fix typos testing for this or that instruction. From-SVN: r45008
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 09a0732..eb33988 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -163,7 +163,6 @@ enum unroll_types
#include "flags.h"
#include "function.h"
#include "expr.h"
-#include "optabs.h"
#include "loop.h"
#include "toplev.h"
#include "hard-reg-set.h"
@@ -936,15 +935,15 @@ unroll_loop (loop, insn_count, strength_reduce_p)
We must copy the final and initial values here to avoid
improperly shared rtl. */
- diff = expand_binop (mode, sub_optab, copy_rtx (final_value),
- copy_rtx (initial_value), NULL_RTX, 0,
- OPTAB_LIB_WIDEN);
+ diff = expand_simple_binop (mode, MINUS, copy_rtx (final_value),
+ copy_rtx (initial_value), NULL_RTX, 0,
+ OPTAB_LIB_WIDEN);
/* Now calculate (diff % (unroll * abs (increment))) by using an
and instruction. */
- diff = expand_binop (GET_MODE (diff), and_optab, diff,
- GEN_INT (unroll_number * abs_inc - 1),
- NULL_RTX, 0, OPTAB_LIB_WIDEN);
+ diff = expand_simple_binop (GET_MODE (diff), AND, diff,
+ GEN_INT (unroll_number * abs_inc - 1),
+ NULL_RTX, 0, OPTAB_LIB_WIDEN);
/* Now emit a sequence of branches to jump to the proper precond
loop entry point. */
@@ -2298,8 +2297,8 @@ emit_unrolled_add (dest_reg, src_reg, increment)
{
rtx result;
- result = expand_binop (GET_MODE (dest_reg), add_optab, src_reg, increment,
- dest_reg, 0, OPTAB_LIB_WIDEN);
+ result = expand_simple_binop (GET_MODE (dest_reg), PLUS, src_reg, increment,
+ dest_reg, 0, OPTAB_LIB_WIDEN);
if (dest_reg != result)
emit_move_insn (dest_reg, result);
@@ -3314,9 +3313,9 @@ final_giv_value (loop, v)
if (biv->insn == insn)
{
start_sequence ();
- tem = expand_binop (GET_MODE (tem), sub_optab, tem,
- biv->add_val, NULL_RTX, 0,
- OPTAB_LIB_WIDEN);
+ tem = expand_simple_binop (GET_MODE (tem), MINUS, tem,
+ biv->add_val, NULL_RTX, 0,
+ OPTAB_LIB_WIDEN);
seq = gen_sequence ();
end_sequence ();
loop_insn_sink (loop, seq);