tree.def (FIX_CEIL_EXPR, [...]): Remove unused tree codes.
2006-11-11 Richard Guenther <rguenther@suse.de> * tree.def (FIX_CEIL_EXPR, FIX_FLOOR_EXPR, FIX_ROUND_EXPR): Remove unused tree codes. * tree-vrp.c (extract_range_from_unary_expr): Remove handling of FIX_CEIL_EXPR, FIX_FLOOR_EXPR and FIX_ROUND_EXPR. * tree-pretty-print.c (dump_generic_node, op_prio): Likewise. * tree.c (stabilize_reference): Likewise. * fold-const.c (fold_convert_const_int_from_real, operand_equal_p, fold_unary): Likewise. * tree-gimple.c (is_gimple_cast): Likewise. * dwarf2out.c (loc_descriptor_from_tree_1): Likewise. * expr.c (expand_expr_real_1): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * gimplify.c (gimplify_expr): Likewise. * tree-inline.c (estimate_num_insns_1): Likewise. * tree-cfg.c (verify_expr): Likewise. cp/ * typeck.c (build_unary_op): Likewise. java/ * check-init.c (check_init): Likewise. ada/ * trans.c (maybe_stabilize_reference): Likewise. fortran/ * trans-intrinsic.c (enum rounding_mode): New enum. (build_fix_expr, gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod, gfc_conv_intrinsic_function): Use it instead of FIX_CEIL_EXPR, FIX_FLOOR_EXPR, FIX_ROUND_EXPR and FIX_TRUNC_EXPR. From-SVN: r118692
This commit is contained in:
parent
e324a72fe6
commit
f9f770a8d5
21 changed files with 61 additions and 91 deletions
|
@ -1,3 +1,21 @@
|
|||
2006-11-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* tree.def (FIX_CEIL_EXPR, FIX_FLOOR_EXPR, FIX_ROUND_EXPR):
|
||||
Remove unused tree codes.
|
||||
* tree-vrp.c (extract_range_from_unary_expr): Remove handling
|
||||
of FIX_CEIL_EXPR, FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
|
||||
* tree-pretty-print.c (dump_generic_node, op_prio): Likewise.
|
||||
* tree.c (stabilize_reference): Likewise.
|
||||
* fold-const.c (fold_convert_const_int_from_real, operand_equal_p,
|
||||
fold_unary): Likewise.
|
||||
* tree-gimple.c (is_gimple_cast): Likewise.
|
||||
* dwarf2out.c (loc_descriptor_from_tree_1): Likewise.
|
||||
* expr.c (expand_expr_real_1): Likewise.
|
||||
* tree-eh.c (tree_could_trap_p): Likewise.
|
||||
* gimplify.c (gimplify_expr): Likewise.
|
||||
* tree-inline.c (estimate_num_insns_1): Likewise.
|
||||
* tree-cfg.c (verify_expr): Likewise.
|
||||
|
||||
2006-11-11 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
* tree-ssa-loop.c (pass_loop_prefetch): Change name to aprefetch.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-11-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* trans.c (maybe_stabilize_reference): Remove handling of
|
||||
FIX_CEIL_EXPR, FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
|
||||
|
||||
2006-11-05 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads
|
||||
|
|
|
@ -6033,9 +6033,6 @@ maybe_stabilize_reference (tree ref, bool force, bool lvalues_only,
|
|||
case CONVERT_EXPR:
|
||||
case FLOAT_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case VIEW_CONVERT_EXPR:
|
||||
result
|
||||
= build1 (code, type,
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-11-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
|
||||
FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
|
||||
|
||||
2006-11-03 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
* call.c (build_op_delete_call): Test user-visible type against
|
||||
|
|
|
@ -4146,9 +4146,6 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert)
|
|||
case CONVERT_EXPR:
|
||||
case FLOAT_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
{
|
||||
tree incremented, modify, value, compound;
|
||||
if (! lvalue_p (arg) && pedantic)
|
||||
|
@ -4301,9 +4298,6 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert)
|
|||
case CONVERT_EXPR:
|
||||
case FLOAT_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
if (! lvalue_p (arg) && pedantic)
|
||||
pedwarn ("ISO C++ forbids taking the address of a cast to a non-lvalue expression");
|
||||
break;
|
||||
|
|
|
@ -9478,9 +9478,6 @@ loc_descriptor_from_tree_1 (tree loc, int want_address)
|
|||
break;
|
||||
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
return 0;
|
||||
|
||||
default:
|
||||
|
|
|
@ -8188,11 +8188,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
|||
subtarget, &op0, &op1, 0);
|
||||
return expand_divmod (1, code, mode, op0, op1, target, unsignedp);
|
||||
|
||||
case FIX_ROUND_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
gcc_unreachable (); /* Not used for C. */
|
||||
|
||||
case FIX_TRUNC_EXPR:
|
||||
op0 = expand_normal (TREE_OPERAND (exp, 0));
|
||||
if (target == 0 || modifier == EXPAND_STACK_PARM)
|
||||
|
|
|
@ -1860,18 +1860,6 @@ fold_convert_const_int_from_real (enum tree_code code, tree type, tree arg1)
|
|||
real_trunc (&r, VOIDmode, &x);
|
||||
break;
|
||||
|
||||
case FIX_CEIL_EXPR:
|
||||
real_ceil (&r, VOIDmode, &x);
|
||||
break;
|
||||
|
||||
case FIX_FLOOR_EXPR:
|
||||
real_floor (&r, VOIDmode, &x);
|
||||
break;
|
||||
|
||||
case FIX_ROUND_EXPR:
|
||||
real_round (&r, VOIDmode, &x);
|
||||
break;
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
@ -2610,10 +2598,7 @@ operand_equal_p (tree arg0, tree arg1, unsigned int flags)
|
|||
{
|
||||
case NOP_EXPR:
|
||||
case CONVERT_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
if (TYPE_UNSIGNED (TREE_TYPE (arg0))
|
||||
!= TYPE_UNSIGNED (TREE_TYPE (arg1)))
|
||||
return 0;
|
||||
|
@ -7299,9 +7284,6 @@ fold_unary (enum tree_code code, tree type, tree op0)
|
|||
case FLOAT_EXPR:
|
||||
case CONVERT_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
if (TREE_TYPE (op0) == type)
|
||||
return op0;
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2006-11-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* trans-intrinsic.c (enum rounding_mode): New enum.
|
||||
(build_fix_expr, gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
|
||||
gfc_conv_intrinsic_function): Use it instead of FIX_CEIL_EXPR,
|
||||
FIX_FLOOR_EXPR, FIX_ROUND_EXPR and FIX_TRUNC_EXPR.
|
||||
|
||||
2006-11-10 Brooks Moses <brooks.moses@codesourcery.com>
|
||||
|
||||
* lang.opt (-fmodule-private): Remove option.
|
||||
|
|
|
@ -160,6 +160,7 @@ typedef struct
|
|||
}
|
||||
real_compnt_info;
|
||||
|
||||
enum rounding_mode { RND_ROUND, RND_TRUNC, RND_CEIL, RND_FLOOR };
|
||||
|
||||
/* Evaluate the arguments to an intrinsic function. */
|
||||
|
||||
|
@ -307,23 +308,24 @@ build_round_expr (stmtblock_t * pblock, tree arg, tree type)
|
|||
|
||||
static tree
|
||||
build_fix_expr (stmtblock_t * pblock, tree arg, tree type,
|
||||
enum tree_code op)
|
||||
enum rounding_mode op)
|
||||
{
|
||||
switch (op)
|
||||
{
|
||||
case FIX_FLOOR_EXPR:
|
||||
case RND_FLOOR:
|
||||
return build_fixbound_expr (pblock, arg, type, 0);
|
||||
break;
|
||||
|
||||
case FIX_CEIL_EXPR:
|
||||
case RND_CEIL:
|
||||
return build_fixbound_expr (pblock, arg, type, 1);
|
||||
break;
|
||||
|
||||
case FIX_ROUND_EXPR:
|
||||
case RND_ROUND:
|
||||
return build_round_expr (pblock, arg, type);
|
||||
|
||||
default:
|
||||
return build1 (op, type, arg);
|
||||
gcc_assert (op == RND_TRUNC);
|
||||
return build1 (FIX_TRUNC_EXPR, type, arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,7 +340,7 @@ build_fix_expr (stmtblock_t * pblock, tree arg, tree type,
|
|||
*/
|
||||
|
||||
static void
|
||||
gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum tree_code op)
|
||||
gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum rounding_mode op)
|
||||
{
|
||||
tree type;
|
||||
tree itype;
|
||||
|
@ -355,7 +357,7 @@ gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum tree_code op)
|
|||
/* We have builtin functions for some cases. */
|
||||
switch (op)
|
||||
{
|
||||
case FIX_ROUND_EXPR:
|
||||
case RND_ROUND:
|
||||
switch (kind)
|
||||
{
|
||||
case 4:
|
||||
|
@ -373,7 +375,7 @@ gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum tree_code op)
|
|||
}
|
||||
break;
|
||||
|
||||
case FIX_TRUNC_EXPR:
|
||||
case RND_TRUNC:
|
||||
switch (kind)
|
||||
{
|
||||
case 4:
|
||||
|
@ -437,7 +439,7 @@ gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum tree_code op)
|
|||
/* Convert to an integer using the specified rounding mode. */
|
||||
|
||||
static void
|
||||
gfc_conv_intrinsic_int (gfc_se * se, gfc_expr * expr, int op)
|
||||
gfc_conv_intrinsic_int (gfc_se * se, gfc_expr * expr, enum rounding_mode op)
|
||||
{
|
||||
tree type;
|
||||
tree arg;
|
||||
|
@ -1076,9 +1078,9 @@ gfc_conv_intrinsic_mod (gfc_se * se, gfc_expr * expr, int modulo)
|
|||
|
||||
itype = gfc_get_int_type (ikind);
|
||||
if (modulo)
|
||||
tmp = build_fix_expr (&se->pre, tmp, itype, FIX_FLOOR_EXPR);
|
||||
tmp = build_fix_expr (&se->pre, tmp, itype, RND_FLOOR);
|
||||
else
|
||||
tmp = build_fix_expr (&se->pre, tmp, itype, FIX_TRUNC_EXPR);
|
||||
tmp = build_fix_expr (&se->pre, tmp, itype, RND_TRUNC);
|
||||
tmp = convert (type, tmp);
|
||||
tmp = build3 (COND_EXPR, type, test2, tmp, arg);
|
||||
tmp = build2 (MULT_EXPR, type, tmp, arg2);
|
||||
|
@ -3474,7 +3476,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
|
|||
break;
|
||||
|
||||
case GFC_ISYM_AINT:
|
||||
gfc_conv_intrinsic_aint (se, expr, FIX_TRUNC_EXPR);
|
||||
gfc_conv_intrinsic_aint (se, expr, RND_TRUNC);
|
||||
break;
|
||||
|
||||
case GFC_ISYM_ALL:
|
||||
|
@ -3482,7 +3484,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
|
|||
break;
|
||||
|
||||
case GFC_ISYM_ANINT:
|
||||
gfc_conv_intrinsic_aint (se, expr, FIX_ROUND_EXPR);
|
||||
gfc_conv_intrinsic_aint (se, expr, RND_ROUND);
|
||||
break;
|
||||
|
||||
case GFC_ISYM_AND:
|
||||
|
@ -3515,19 +3517,19 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
|
|||
case GFC_ISYM_INT2:
|
||||
case GFC_ISYM_INT8:
|
||||
case GFC_ISYM_LONG:
|
||||
gfc_conv_intrinsic_int (se, expr, FIX_TRUNC_EXPR);
|
||||
gfc_conv_intrinsic_int (se, expr, RND_TRUNC);
|
||||
break;
|
||||
|
||||
case GFC_ISYM_NINT:
|
||||
gfc_conv_intrinsic_int (se, expr, FIX_ROUND_EXPR);
|
||||
gfc_conv_intrinsic_int (se, expr, RND_ROUND);
|
||||
break;
|
||||
|
||||
case GFC_ISYM_CEILING:
|
||||
gfc_conv_intrinsic_int (se, expr, FIX_CEIL_EXPR);
|
||||
gfc_conv_intrinsic_int (se, expr, RND_CEIL);
|
||||
break;
|
||||
|
||||
case GFC_ISYM_FLOOR:
|
||||
gfc_conv_intrinsic_int (se, expr, FIX_FLOOR_EXPR);
|
||||
gfc_conv_intrinsic_int (se, expr, RND_FLOOR);
|
||||
break;
|
||||
|
||||
case GFC_ISYM_MOD:
|
||||
|
|
|
@ -5489,9 +5489,6 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p,
|
|||
/* FALLTHRU */
|
||||
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
/* unary_expr: ... | '(' cast ')' val | ... */
|
||||
ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
|
||||
is_gimple_val, fb_rvalue);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-11-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
|
||||
FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
|
||||
|
||||
2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
|
||||
|
||||
* decl.c: Include langhooks.h.
|
||||
|
|
|
@ -814,9 +814,6 @@ check_init (tree exp, words before)
|
|||
case ADDR_EXPR:
|
||||
case NON_LVALUE_EXPR:
|
||||
case INSTANCEOF_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
case ABS_EXPR:
|
||||
/* Avoid needless recursion. */
|
||||
exp = TREE_OPERAND (exp, 0);
|
||||
|
|
|
@ -3329,9 +3329,6 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
|
|||
case NOP_EXPR:
|
||||
case CONVERT_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
case FLOAT_EXPR:
|
||||
case NEGATE_EXPR:
|
||||
case ABS_EXPR:
|
||||
|
|
|
@ -1956,9 +1956,6 @@ tree_could_trap_p (tree expr)
|
|||
|
||||
case CONVERT_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
/* Conversion of floating point might trap. */
|
||||
return honor_nans;
|
||||
|
||||
|
|
|
@ -409,10 +409,7 @@ is_gimple_cast (tree t)
|
|||
{
|
||||
return (TREE_CODE (t) == NOP_EXPR
|
||||
|| TREE_CODE (t) == CONVERT_EXPR
|
||||
|| TREE_CODE (t) == FIX_TRUNC_EXPR
|
||||
|| TREE_CODE (t) == FIX_CEIL_EXPR
|
||||
|| TREE_CODE (t) == FIX_FLOOR_EXPR
|
||||
|| TREE_CODE (t) == FIX_ROUND_EXPR);
|
||||
|| TREE_CODE (t) == FIX_TRUNC_EXPR);
|
||||
}
|
||||
|
||||
/* Return true if T is a valid op0 of a CALL_EXPR. */
|
||||
|
|
|
@ -1700,9 +1700,6 @@ estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
|
|||
case MULT_EXPR:
|
||||
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
|
||||
case NEGATE_EXPR:
|
||||
case FLOAT_EXPR:
|
||||
|
|
|
@ -1324,9 +1324,6 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
|
|||
break;
|
||||
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
case FLOAT_EXPR:
|
||||
case CONVERT_EXPR:
|
||||
case NOP_EXPR:
|
||||
|
@ -2236,9 +2233,6 @@ op_prio (tree op)
|
|||
case NOP_EXPR:
|
||||
case CONVERT_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
case TARGET_EXPR:
|
||||
return 14;
|
||||
|
||||
|
|
|
@ -1596,9 +1596,6 @@ extract_range_from_unary_expr (value_range_t *vr, tree expr)
|
|||
/* Refuse to operate on certain unary expressions for which we
|
||||
cannot easily determine a resulting range. */
|
||||
if (code == FIX_TRUNC_EXPR
|
||||
|| code == FIX_CEIL_EXPR
|
||||
|| code == FIX_FLOOR_EXPR
|
||||
|| code == FIX_ROUND_EXPR
|
||||
|| code == FLOAT_EXPR
|
||||
|| code == BIT_NOT_EXPR
|
||||
|| code == NON_LVALUE_EXPR
|
||||
|
|
|
@ -2599,9 +2599,6 @@ stabilize_reference (tree ref)
|
|||
case CONVERT_EXPR:
|
||||
case FLOAT_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
case FIX_FLOOR_EXPR:
|
||||
case FIX_ROUND_EXPR:
|
||||
case FIX_CEIL_EXPR:
|
||||
result = build_nt (code, stabilize_reference (TREE_OPERAND (ref, 0)));
|
||||
break;
|
||||
|
||||
|
|
|
@ -634,15 +634,8 @@ DEFTREECODE (RDIV_EXPR, "rdiv_expr", tcc_binary, 2)
|
|||
Used for pointer subtraction in C. */
|
||||
DEFTREECODE (EXACT_DIV_EXPR, "exact_div_expr", tcc_binary, 2)
|
||||
|
||||
/* Conversion of real to fixed point: four ways to round,
|
||||
like the four ways to divide.
|
||||
CONVERT_EXPR can also be used to convert a real to an integer,
|
||||
and that is what is used in languages that do not have ways of
|
||||
specifying which of these is wanted. Maybe these are not needed. */
|
||||
/* Conversion of real to fixed point by truncation. */
|
||||
DEFTREECODE (FIX_TRUNC_EXPR, "fix_trunc_expr", tcc_unary, 1)
|
||||
DEFTREECODE (FIX_CEIL_EXPR, "fix_ceil_expr", tcc_unary, 1)
|
||||
DEFTREECODE (FIX_FLOOR_EXPR, "fix_floor_expr", tcc_unary, 1)
|
||||
DEFTREECODE (FIX_ROUND_EXPR, "fix_round_expr", tcc_unary, 1)
|
||||
|
||||
/* Conversion of an integer to a real. */
|
||||
DEFTREECODE (FLOAT_EXPR, "float_expr", tcc_unary, 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue