diff options
-rw-r--r-- | gcc/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/trans.c | 3 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 6 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 3 | ||||
-rw-r--r-- | gcc/expr.c | 5 | ||||
-rw-r--r-- | gcc/fold-const.c | 18 | ||||
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-intrinsic.c | 36 | ||||
-rw-r--r-- | gcc/gimplify.c | 3 | ||||
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/check-init.c | 3 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 3 | ||||
-rw-r--r-- | gcc/tree-eh.c | 3 | ||||
-rw-r--r-- | gcc/tree-gimple.c | 5 | ||||
-rw-r--r-- | gcc/tree-inline.c | 3 | ||||
-rw-r--r-- | gcc/tree-pretty-print.c | 6 | ||||
-rw-r--r-- | gcc/tree-vrp.c | 3 | ||||
-rw-r--r-- | gcc/tree.c | 3 | ||||
-rw-r--r-- | gcc/tree.def | 9 |
21 files changed, 61 insertions, 91 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 59ecc97..653de70 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d9ab2ab..cae53bb 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c index eaa6fc6..873ad5f 100644 --- a/gcc/ada/trans.c +++ b/gcc/ada/trans.c @@ -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, diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9cd3d29..dc6a266 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 242ae19..c257f00 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -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; diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 0aaf70e..28108ec 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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) diff --git a/gcc/fold-const.c b/gcc/fold-const.c index e1c3c1f..b715ad8 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -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; diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2b4eaad..66ee88e9 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -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. diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 5389c0b..ec857a53 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -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: diff --git a/gcc/gimplify.c b/gcc/gimplify.c index fedc284..4e5d609 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -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); diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index d171343..8bc6c35 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -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. diff --git a/gcc/java/check-init.c b/gcc/java/check-init.c index 6eb1f16..4aca992 100644 --- a/gcc/java/check-init.c +++ b/gcc/java/check-init.c @@ -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); diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 46ee1b1..ab5a234 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -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: diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index e3341b1..2a723b3 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -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; diff --git a/gcc/tree-gimple.c b/gcc/tree-gimple.c index 740f673..3dab75d 100644 --- a/gcc/tree-gimple.c +++ b/gcc/tree-gimple.c @@ -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. */ diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 07fae35..8ce32db 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -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: diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index bca6c00..c2a47f0 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -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; diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index afe7140..637263d 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -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; diff --git a/gcc/tree.def b/gcc/tree.def index 2c16cb9..3c40688 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -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) |