tree-flow.h (mark_addressable): Move declaration ...

2009-09-01  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (mark_addressable): Move declaration ...
	* tree.h (mark_addressable): ... here.
	* stmt.c (expand_asm_operands): Use mark_addressable, not
	lang_hooks.mark_addressable.
	* langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove
	LANG_HOOKS_MARK_ADDRESSABLE.
	* langhooks.h (struct lang_hooks): Remove mark_addressable langhook.

	* c-objc-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove.

	ada/
	* gcc-interface/misc.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.

	cp/
	* cp-objcp-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove.

	fortran/
	* f95-lang.c (gfc_mark_addressable): Remove.
	(LANG_HOOKS_MARK_ADDRESSABLE): Likewise.

	java/
	* lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
	* java-tree.h (java_mark_addressable): Likewise.
	* typeck.c (java_mark_addressable): Likewise.

From-SVN: r151260
This commit is contained in:
Richard Guenther 2009-09-01 08:38:10 +00:00 committed by Richard Biener
parent 5fa162c0d1
commit 58f986ca91
17 changed files with 33 additions and 163 deletions

View File

@ -1,3 +1,14 @@
2009-09-01 Richard Guenther <rguenther@suse.de>
* tree-flow.h (mark_addressable): Move declaration ...
* tree.h (mark_addressable): ... here.
* stmt.c (expand_asm_operands): Use mark_addressable, not
lang_hooks.mark_addressable.
* langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove
LANG_HOOKS_MARK_ADDRESSABLE.
* langhooks.h (struct lang_hooks): Remove mark_addressable langhook.
* c-objc-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
2009-08-31 Chris Demetriou <cgd@google.com>
* config/i386/i386.c (ix86_vectorize_builtin_conversion): Never

View File

@ -1,3 +1,7 @@
2009-09-01 Richard Guenther <rguenther@suse.de>
* gcc-interface/misc.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
2009-08-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (call_to_gnu): Tidy.

View File

@ -106,8 +106,6 @@ static void gnat_get_subrange_bounds (const_tree, tree *, tree *);
#define LANG_HOOKS_WRITE_GLOBALS gnat_write_global_declarations
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET gnat_get_alias_set
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE gnat_mark_addressable
#undef LANG_HOOKS_PRINT_DECL
#define LANG_HOOKS_PRINT_DECL gnat_print_decl
#undef LANG_HOOKS_PRINT_TYPE

View File

@ -40,8 +40,6 @@ along with GCC; see the file COPYING3. If not see
#define LANG_HOOKS_POST_OPTIONS c_common_post_options
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
#undef LANG_HOOKS_FINISH_INCOMPLETE_DECL

View File

@ -1,3 +1,7 @@
2009-09-01 Richard Guenther <rguenther@suse.de>
* cp-objcp-common.h (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
2009-08-31 Dodji Seketeli <dodji@redhat.com>
PR debug/30161

View File

@ -58,8 +58,6 @@ extern bool cp_function_decl_explicit_p (tree decl);
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE cxx_mark_addressable
#undef LANG_HOOKS_PRINT_STATISTICS
#define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics
#undef LANG_HOOKS_PRINT_XNODE

View File

@ -1,3 +1,8 @@
2009-09-01 Richard Guenther <rguenther@suse.de>
* f95-lang.c (gfc_mark_addressable): Remove.
(LANG_HOOKS_MARK_ADDRESSABLE): Likewise.
2009-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/39229

View File

@ -94,7 +94,6 @@ static void gfc_init_builtin_functions (void);
static bool gfc_init (void);
static void gfc_finish (void);
static void gfc_print_identifier (FILE *, tree, int);
static bool gfc_mark_addressable (tree);
void do_function_end (void);
int global_bindings_p (void);
static void clear_binding_stack (void);
@ -137,7 +136,6 @@ static void gfc_init_ts (void);
#define LANG_HOOKS_POST_OPTIONS gfc_post_options
#define LANG_HOOKS_PRINT_IDENTIFIER gfc_print_identifier
#define LANG_HOOKS_PARSE_FILE gfc_be_parse_file
#define LANG_HOOKS_MARK_ADDRESSABLE gfc_mark_addressable
#define LANG_HOOKS_TYPE_FOR_MODE gfc_type_for_mode
#define LANG_HOOKS_TYPE_FOR_SIZE gfc_type_for_size
#define LANG_HOOKS_GET_ALIAS_SET gfc_get_alias_set
@ -563,84 +561,6 @@ gfc_init_decl_processing (void)
}
/* Mark EXP saying that we need to be able to take the
address of it; it should not be allocated in a register.
In Fortran 95 this is only the case for variables with
the TARGET attribute, but we implement it here for a
likely future Cray pointer extension.
Value is 1 if successful. */
/* TODO: Check/fix mark_addressable. */
bool
gfc_mark_addressable (tree exp)
{
register tree x = exp;
while (1)
switch (TREE_CODE (x))
{
case COMPONENT_REF:
case ADDR_EXPR:
case ARRAY_REF:
case REALPART_EXPR:
case IMAGPART_EXPR:
x = TREE_OPERAND (x, 0);
break;
case CONSTRUCTOR:
TREE_ADDRESSABLE (x) = 1;
return true;
case VAR_DECL:
case CONST_DECL:
case PARM_DECL:
case RESULT_DECL:
if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x) && DECL_NONLOCAL (x))
{
if (TREE_PUBLIC (x))
{
error ("global register variable %qs used in nested function",
IDENTIFIER_POINTER (DECL_NAME (x)));
return false;
}
pedwarn (input_location, 0, "register variable %qs used in nested function",
IDENTIFIER_POINTER (DECL_NAME (x)));
}
else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x))
{
if (TREE_PUBLIC (x))
{
error ("address of global register variable %qs requested",
IDENTIFIER_POINTER (DECL_NAME (x)));
return true;
}
#if 0
/* If we are making this addressable due to its having
volatile components, give a different error message. Also
handle the case of an unnamed parameter by not trying
to give the name. */
else if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (x)))
{
error ("cannot put object with volatile field into register");
return false;
}
#endif
pedwarn (input_location, 0, "address of register variable %qs requested",
IDENTIFIER_POINTER (DECL_NAME (x)));
}
/* drops in */
case FUNCTION_DECL:
TREE_ADDRESSABLE (x) = 1;
default:
return true;
}
}
/* Return the typed-based alias set for T, which may be an expression
or a type. Return -1 if we don't do anything special. */

View File

@ -1,3 +1,9 @@
2009-09-01 Richard Guenther <rguenther@suse.de>
* lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
* java-tree.h (java_mark_addressable): Likewise.
* typeck.c (java_mark_addressable): Likewise.
2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Make-lang.in (java.install-pdf): Install gcj.pdf in

View File

@ -988,7 +988,6 @@ struct GTY(()) lang_type {
struct eh_range;
extern void java_parse_file (int);
extern bool java_mark_addressable (tree);
extern tree java_type_for_mode (enum machine_mode, int);
extern tree java_type_for_size (unsigned int, int);
extern tree java_truthvalue_conversion (tree);

View File

@ -129,8 +129,6 @@ struct GTY(()) language_function {
#define LANG_HOOKS_POST_OPTIONS java_post_options
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE java_parse_file
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE java_mark_addressable
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl
#undef LANG_HOOKS_DECL_PRINTABLE_NAME

View File

@ -193,71 +193,6 @@ java_type_for_size (unsigned bits, int unsignedp)
return 0;
}
/* Mark EXP saying that we need to be able to take the
address of it; it should not be allocated in a register.
Value is true if successful. */
bool
java_mark_addressable (tree exp)
{
tree x = exp;
while (1)
switch (TREE_CODE (x))
{
case ADDR_EXPR:
case COMPONENT_REF:
case ARRAY_REF:
case REALPART_EXPR:
case IMAGPART_EXPR:
x = TREE_OPERAND (x, 0);
break;
case TRUTH_ANDIF_EXPR:
case TRUTH_ORIF_EXPR:
case COMPOUND_EXPR:
x = TREE_OPERAND (x, 1);
break;
case COND_EXPR:
return java_mark_addressable (TREE_OPERAND (x, 1))
&& java_mark_addressable (TREE_OPERAND (x, 2));
case CONSTRUCTOR:
TREE_ADDRESSABLE (x) = 1;
return true;
case INDIRECT_REF:
/* We sometimes add a cast *(TYPE*)&FOO to handle type and mode
incompatibility problems. Handle this case by marking FOO. */
if (TREE_CODE (TREE_OPERAND (x, 0)) == NOP_EXPR
&& TREE_CODE (TREE_OPERAND (TREE_OPERAND (x, 0), 0)) == ADDR_EXPR)
{
x = TREE_OPERAND (TREE_OPERAND (x, 0), 0);
break;
}
if (TREE_CODE (TREE_OPERAND (x, 0)) == ADDR_EXPR)
{
x = TREE_OPERAND (x, 0);
break;
}
return true;
case VAR_DECL:
case CONST_DECL:
case PARM_DECL:
case RESULT_DECL:
case FUNCTION_DECL:
TREE_ADDRESSABLE (x) = 1;
#if 0 /* poplevel deals with this now. */
if (DECL_CONTEXT (x) == 0)
TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1;
#endif
/* drops through */
default:
return true;
}
}
/* Thorough checking of the arrayness of TYPE. */
int

View File

@ -243,7 +243,6 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_MISSING_NORETURN_OK_P, \
LANG_HOOKS_GET_ALIAS_SET, \
LANG_HOOKS_FINISH_INCOMPLETE_DECL, \
LANG_HOOKS_MARK_ADDRESSABLE, \
LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, \
LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, \
LANG_HOOKS_PRINT_STATISTICS, \

View File

@ -298,11 +298,6 @@ struct lang_hooks
compilation. Default hook is does nothing. */
void (*finish_incomplete_decl) (tree);
/* Mark EXP saying that we need to be able to take the address of
it; it should not be allocated in a register. Return true if
successful. */
bool (*mark_addressable) (tree);
/* Replace the DECL_LANG_SPECIFIC data, which may be NULL, of the
DECL_NODE with a newly GC-allocated copy. */
void (*dup_lang_specific_decl) (tree);

View File

@ -737,7 +737,7 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
|| (DECL_P (val)
&& REG_P (DECL_RTL (val))
&& GET_MODE (DECL_RTL (val)) != TYPE_MODE (type))))
lang_hooks.mark_addressable (val);
mark_addressable (val);
if (is_inout)
ninout++;
@ -766,7 +766,7 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
return;
if (! allows_reg && allows_mem)
lang_hooks.mark_addressable (TREE_VALUE (tail));
mark_addressable (TREE_VALUE (tail));
}
/* Second pass evaluates arguments. */

View File

@ -890,7 +890,6 @@ tree force_gimple_operand (tree, gimple_seq *, bool, tree);
tree force_gimple_operand_gsi (gimple_stmt_iterator *, tree, bool, tree,
bool, enum gsi_iterator_update);
tree gimple_fold_indirect_ref (tree);
void mark_addressable (tree);
/* In tree-ssa-live.c */
extern void remove_unused_locals (void);

View File

@ -5157,6 +5157,7 @@ extern bool in_gimple_form;
/* In gimple.c. */
extern tree get_base_address (tree t);
extern void mark_addressable (tree);
/* In tree-vectorizer.c. */
extern void vect_set_verbosity_level (const char *);