aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-09-14 19:56:02 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-09-14 19:56:02 -0700
commitb437f1a754649a06bd783fc707b5bff14c9c5eed (patch)
treec872b3e523121e9f2a44aa161148aa4ae170889e
parentd9dbd9b14c46ec13e078e8bdbea29c860d495f1e (diff)
downloadgcc-b437f1a754649a06bd783fc707b5bff14c9c5eed.zip
gcc-b437f1a754649a06bd783fc707b5bff14c9c5eed.tar.gz
gcc-b437f1a754649a06bd783fc707b5bff14c9c5eed.tar.bz2
calls.c (precompute_register_parameters): Use COSTS_N_INSNS, not 2.
* calls.c (precompute_register_parameters): Use COSTS_N_INSNS, not 2. * cse.c (rtx_cost): Likewise. * optabls.c (expand_binop): Likewise. (expand_twoval_binop, prepare_cmp_insn): Likewise. * regclass.c (copy_cost): Likewise. * reload1.c (reload_cse_move2add): Likewise. From-SVN: r36423
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/calls.c2
-rw-r--r--gcc/cse.c2
-rw-r--r--gcc/optabs.c12
-rw-r--r--gcc/regclass.c2
-rw-r--r--gcc/reload1.c2
6 files changed, 19 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8cf66c1..8e6a9d8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2000-09-14 Richard Henderson <rth@cygnus.com>
+
+ * calls.c (precompute_register_parameters): Use COSTS_N_INSNS, not 2.
+ * cse.c (rtx_cost): Likewise.
+ * optabls.c (expand_binop): Likewise.
+ (expand_twoval_binop, prepare_cmp_insn): Likewise.
+ * regclass.c (copy_cost): Likewise.
+ * reload1.c (reload_cse_move2add): Likewise.
+
2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
* c-parse.in (reswords): Add _Complex.
diff --git a/gcc/calls.c b/gcc/calls.c
index 885817d..45a7749 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -864,7 +864,7 @@ precompute_register_parameters (num_actuals, args, reg_parm_seen)
|| (GET_CODE (args[i].value) == SUBREG
&& GET_CODE (SUBREG_REG (args[i].value)) == REG)))
&& args[i].mode != BLKmode
- && rtx_cost (args[i].value, SET) > 2
+ && rtx_cost (args[i].value, SET) > COSTS_N_INSNS (1)
&& ((SMALL_REGISTER_CLASSES && *reg_parm_seen)
|| preserve_subexpressions_p ()))
args[i].value = copy_to_mode_reg (args[i].mode, args[i].value);
diff --git a/gcc/cse.c b/gcc/cse.c
index 2396889..3f6f354 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -860,7 +860,7 @@ rtx_cost (x, outer_code)
total = 0;
break;
default:
- total = 2;
+ total = COSTS_N_INSNS (1);
}
switch (code)
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 07928d7..f35300b 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -635,11 +635,11 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
/* If we are inside an appropriately-short loop and one operand is an
expensive constant, force it into a register. */
if (CONSTANT_P (op0) && preserve_subexpressions_p ()
- && rtx_cost (op0, binoptab->code) > 2)
+ && rtx_cost (op0, binoptab->code) > COSTS_N_INSNS (1))
op0 = force_reg (mode, op0);
if (CONSTANT_P (op1) && preserve_subexpressions_p ()
- && ! shift_op && rtx_cost (op1, binoptab->code) > 2)
+ && ! shift_op && rtx_cost (op1, binoptab->code) > COSTS_N_INSNS (1))
op1 = force_reg (mode, op1);
/* Record where to delete back to if we backtrack. */
@@ -1876,11 +1876,11 @@ expand_twoval_binop (binoptab, op0, op1, targ0, targ1, unsignedp)
/* If we are inside an appropriately-short loop and one operand is an
expensive constant, force it into a register. */
if (CONSTANT_P (op0) && preserve_subexpressions_p ()
- && rtx_cost (op0, binoptab->code) > 2)
+ && rtx_cost (op0, binoptab->code) > COSTS_N_INSNS (1))
op0 = force_reg (mode, op0);
if (CONSTANT_P (op1) && preserve_subexpressions_p ()
- && rtx_cost (op1, binoptab->code) > 2)
+ && rtx_cost (op1, binoptab->code) > COSTS_N_INSNS (1))
op1 = force_reg (mode, op1);
if (targ0)
@@ -2956,11 +2956,11 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align,
/* If we are inside an appropriately-short loop and one operand is an
expensive constant, force it into a register. */
if (CONSTANT_P (x) && preserve_subexpressions_p ()
- && rtx_cost (x, COMPARE) > 2)
+ && rtx_cost (x, COMPARE) > COSTS_N_INSNS (1))
x = force_reg (mode, x);
if (CONSTANT_P (y) && preserve_subexpressions_p ()
- && rtx_cost (y, COMPARE) > 2)
+ && rtx_cost (y, COMPARE) > COSTS_N_INSNS (1))
y = force_reg (mode, y);
#ifdef HAVE_cc0
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 866f5b8..537a34e 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -1813,7 +1813,7 @@ copy_cost (x, mode, class, to_p)
else
/* If this is a constant, we may eventually want to call rtx_cost here. */
- return 2;
+ return COSTS_N_INSNS (1);
}
/* Record the pseudo registers we must reload into hard registers
diff --git a/gcc/reload1.c b/gcc/reload1.c
index fb84047..3305f9f 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -8941,7 +8941,7 @@ reload_cse_move2add (first)
success
= validate_change (next, &SET_SRC (set), reg, 0);
else if ((rtx_cost (new_src, PLUS)
- < 2 + rtx_cost (src3, SET))
+ < COSTS_N_INSNS (1) + rtx_cost (src3, SET))
&& have_add2_insn (GET_MODE (reg)))
success
= validate_change (next, &PATTERN (next),