fold-const.c (fold_truthop): Don't check can_use_bit_fields_p.
gcc * fold-const.c (fold_truthop): Don't check can_use_bit_fields_p. (fold_binary): Likewise. * langhooks.c (lhd_can_use_bit_fields_p): Removed. * langhooks-def.h (lhd_can_use_bit_fields_p): Removed. (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed. (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_CAN_USE_BIT_FIELDS_P. * langhooks.h (struct lang_hooks): Removed field 'can_use_bit_fields_p'. gcc/java * lang.c (java_can_use_bit_fields_p): Removed. (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed. From-SVN: r120647
This commit is contained in:
parent
e0ae13896e
commit
08f0e79ed9
7 changed files with 19 additions and 34 deletions
|
@ -1,3 +1,14 @@
|
|||
2007-01-10 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* fold-const.c (fold_truthop): Don't check can_use_bit_fields_p.
|
||||
(fold_binary): Likewise.
|
||||
* langhooks.c (lhd_can_use_bit_fields_p): Removed.
|
||||
* langhooks-def.h (lhd_can_use_bit_fields_p): Removed.
|
||||
(LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
|
||||
(LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_CAN_USE_BIT_FIELDS_P.
|
||||
* langhooks.h (struct lang_hooks): Removed field
|
||||
'can_use_bit_fields_p'.
|
||||
|
||||
2007-01-10 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* config/bfin/t-bfin, config/bfin/t-bfin-elf: Remove GCC_CFLAGS.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Fold a constant sub-tree into a single node for C-compiler
|
||||
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -5117,11 +5117,6 @@ fold_truthop (enum tree_code code, tree truth_type, tree lhs, tree rhs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* After this point all optimizations will generate bit-field
|
||||
references, which we might not want. */
|
||||
if (! lang_hooks.can_use_bit_fields_p ())
|
||||
return 0;
|
||||
|
||||
/* See if we can find a mode that contains both fields being compared on
|
||||
the left. If we can't, fail. Otherwise, update all constants and masks
|
||||
to be relative to a field of that size. */
|
||||
|
@ -10947,8 +10942,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
|
|||
}
|
||||
|
||||
/* If this is a comparison of a field, we may be able to simplify it. */
|
||||
if (((TREE_CODE (arg0) == COMPONENT_REF
|
||||
&& lang_hooks.can_use_bit_fields_p ())
|
||||
if ((TREE_CODE (arg0) == COMPONENT_REF
|
||||
|| TREE_CODE (arg0) == BIT_FIELD_REF)
|
||||
/* Handle the constant case even without -O
|
||||
to make sure the warnings are given. */
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2007-01-10 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* lang.c (java_can_use_bit_fields_p): Removed.
|
||||
(LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
|
||||
|
||||
2007-01-09 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* expr.c (build_java_arrayaccess): Rewrite to generate array
|
||||
|
|
|
@ -60,7 +60,6 @@ static tree java_tree_inlining_walk_subtrees (tree *, int *, walk_tree_fn,
|
|||
void *, struct pointer_set_t *);
|
||||
static int merge_init_test_initialization (void * *, void *);
|
||||
static int inline_init_test_initialization (void * *, void *);
|
||||
static bool java_can_use_bit_fields_p (void);
|
||||
static bool java_dump_tree (void *, tree);
|
||||
static void dump_compound_expr (dump_info_p, tree);
|
||||
static bool java_decl_ok_for_sibcall (tree);
|
||||
|
@ -178,8 +177,6 @@ struct language_function GTY(())
|
|||
#define LANG_HOOKS_DECL_PRINTABLE_NAME lang_printable_name
|
||||
#undef LANG_HOOKS_PRINT_ERROR_FUNCTION
|
||||
#define LANG_HOOKS_PRINT_ERROR_FUNCTION java_print_error_function
|
||||
#undef LANG_HOOKS_CAN_USE_BIT_FIELDS_P
|
||||
#define LANG_HOOKS_CAN_USE_BIT_FIELDS_P java_can_use_bit_fields_p
|
||||
|
||||
#undef LANG_HOOKS_TYPE_FOR_MODE
|
||||
#define LANG_HOOKS_TYPE_FOR_MODE java_type_for_mode
|
||||
|
@ -597,14 +594,6 @@ java_init_options (unsigned int argc ATTRIBUTE_UNUSED,
|
|||
return CL_Java;
|
||||
}
|
||||
|
||||
static bool
|
||||
java_can_use_bit_fields_p (void)
|
||||
{
|
||||
/* The bit-field optimizations cause problems when generating class
|
||||
files. */
|
||||
return flag_emit_class_files ? false : true;
|
||||
}
|
||||
|
||||
/* Post-switch processing. */
|
||||
static bool
|
||||
java_post_options (const char **pfilename)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Default macros to initialize the lang_hooks data structure.
|
||||
Copyright 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
Contributed by Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -60,7 +60,6 @@ extern int lhd_expand_decl (tree);
|
|||
extern void lhd_print_error_function (struct diagnostic_context *,
|
||||
const char *);
|
||||
extern void lhd_set_decl_assembler_name (tree);
|
||||
extern bool lhd_can_use_bit_fields_p (void);
|
||||
extern bool lhd_warn_unused_global_decl (tree);
|
||||
extern void lhd_incomplete_type_error (tree, tree);
|
||||
extern tree lhd_type_promotes_to (tree);
|
||||
|
@ -116,7 +115,6 @@ extern void lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *,
|
|||
#define LANG_HOOKS_STATICP lhd_staticp
|
||||
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL lhd_do_nothing_t
|
||||
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME lhd_set_decl_assembler_name
|
||||
#define LANG_HOOKS_CAN_USE_BIT_FIELDS_P lhd_can_use_bit_fields_p
|
||||
#define LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS false
|
||||
#define LANG_HOOKS_NO_BODY_BLOCKS false
|
||||
#define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing
|
||||
|
@ -303,7 +301,6 @@ extern tree lhd_make_node (enum tree_code);
|
|||
LANG_HOOKS_STATICP, \
|
||||
LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, \
|
||||
LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, \
|
||||
LANG_HOOKS_CAN_USE_BIT_FIELDS_P, \
|
||||
LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS, \
|
||||
LANG_HOOKS_NO_BODY_BLOCKS, \
|
||||
LANG_HOOKS_PRINT_STATISTICS, \
|
||||
|
|
|
@ -185,13 +185,6 @@ lhd_set_decl_assembler_name (tree decl)
|
|||
}
|
||||
}
|
||||
|
||||
/* By default we always allow bit-field based optimizations. */
|
||||
bool
|
||||
lhd_can_use_bit_fields_p (void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Type promotion for variable arguments. */
|
||||
tree
|
||||
lhd_type_promotes_to (tree ARG_UNUSED (type))
|
||||
|
|
|
@ -347,10 +347,6 @@ struct lang_hooks
|
|||
assembler does not talk about it. */
|
||||
void (*set_decl_assembler_name) (tree);
|
||||
|
||||
/* Return nonzero if fold-const is free to use bit-field
|
||||
optimizations, for instance in fold_truthop(). */
|
||||
bool (*can_use_bit_fields_p) (void);
|
||||
|
||||
/* Nonzero if operations on types narrower than their mode should
|
||||
have their results reduced to the precision of the type. */
|
||||
bool reduce_bit_field_operations;
|
||||
|
|
Loading…
Add table
Reference in a new issue