diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-01 08:38:10 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-01 08:38:10 +0000 |
commit | f639fdbff97b434f0ee9d6d2f03b6c5483efbed2 (patch) | |
tree | 7b75c3f77fdca843c801160365568addd7ee492a /gcc | |
parent | 030fcc8b3a801a2c9c5f78c8a351a68f430283d3 (diff) | |
download | gcc-f639fdbff97b434f0ee9d6d2f03b6c5483efbed2.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151260 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/misc.c | 2 | ||||
-rw-r--r-- | gcc/c-objc-common.h | 2 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/cp-objcp-common.h | 2 | ||||
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/f95-lang.c | 80 | ||||
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/java-tree.h | 1 | ||||
-rw-r--r-- | gcc/java/lang.c | 2 | ||||
-rw-r--r-- | gcc/java/typeck.c | 65 | ||||
-rw-r--r-- | gcc/langhooks-def.h | 1 | ||||
-rw-r--r-- | gcc/langhooks.h | 5 | ||||
-rw-r--r-- | gcc/stmt.c | 4 | ||||
-rw-r--r-- | gcc/tree-flow.h | 1 | ||||
-rw-r--r-- | gcc/tree.h | 1 |
17 files changed, 33 insertions, 163 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 61edf909c6e..9b1577c55c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ede9b4da101..1723e41f485 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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. diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index cc9eeaa8035..46e762feeb3 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -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 diff --git a/gcc/c-objc-common.h b/gcc/c-objc-common.h index e90236e96c8..8408b9ffdfe 100644 --- a/gcc/c-objc-common.h +++ b/gcc/c-objc-common.h @@ -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 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fa5bc97ba0a..19c17be7da5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h index 6723a853ced..fe8a04721f3 100644 --- a/gcc/cp/cp-objcp-common.h +++ b/gcc/cp/cp-objcp-common.h @@ -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 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index f690ab1b6d9..ac4175aec54 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -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 diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index f9d1878d379..181f0fcf755 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -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. */ diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 7c1ac22f9e6..a291dffe599 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -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 diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 3bdd75a2ed8..29027eb6463 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -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); diff --git a/gcc/java/lang.c b/gcc/java/lang.c index 4b462705e2b..109ec51e79d 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -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 diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c index c16976ca3b0..1024b7a4de9 100644 --- a/gcc/java/typeck.c +++ b/gcc/java/typeck.c @@ -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 diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h index 25d96e92fa2..afbab6fd4ed 100644 --- a/gcc/langhooks-def.h +++ b/gcc/langhooks-def.h @@ -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, \ diff --git a/gcc/langhooks.h b/gcc/langhooks.h index d708bb2f867..4a590dea504 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -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); diff --git a/gcc/stmt.c b/gcc/stmt.c index fe60ba67150..0a36e10f0b4 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -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. */ diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index 720180c4eb3..8de4675cf20 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -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); diff --git a/gcc/tree.h b/gcc/tree.h index 27918309f60..441612afc71 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -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 *); |