+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
+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.
#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
#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
+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
#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
+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
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);
#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
}
-/* 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. */
+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
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);
#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
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
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, \
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);
|| (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++;
return;
if (! allows_reg && allows_mem)
- lang_hooks.mark_addressable (TREE_VALUE (tail));
+ mark_addressable (TREE_VALUE (tail));
}
/* Second pass evaluates arguments. */
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);
/* 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 *);