summaryrefslogtreecommitdiff
path: root/gcc/langhooks.h
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-23 18:51:18 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-23 18:51:18 +0000
commit2a631e19bed8b13c3856eff9576b6b9bd1c576e7 (patch)
tree4f314d9fb9d201416fb3ebce0a67307306ae796f /gcc/langhooks.h
parentbd08a4e696f9fc58eb5a47250566867849a358e4 (diff)
downloadgcc-2a631e19bed8b13c3856eff9576b6b9bd1c576e7.tar.gz
* alias.c (can_address_p): Compnonents are not addressable if
the containing type has alias set 0. (get_alias_set): Rework to use STRIP_NOPS. Only call front-end routine on object, type, or object with NOPs stripped, not inner values. Use language hook to call front-end routine. * builtins.c (get_memory_rtx): Always call set_mem_attributes. (expand_builtin_apply): Call set_mem_align on MEMs we make. Don't pass alignment to emit_block_move. (expand_builtin_memcpy, expand_builtin_va_copy): Likewise. (expand_builtin_memset): Likewise, but for clear_storage. * c-common.c (lang_get_alias_set): Renamed to c_common_alias_set and remove C++ specific parts. * c-common.h (c_common_get_alias_set): Add declaration. * c-lang.c (LANG_HOOKS_GET_ALIAS_SET): New macro. * calls.c (emit_call_1): Fix typo in sibcall_pop case. (save_fixed_argument_area): Call set_mem_align. Remove alignment in call to emit_block_move. (emit_library_call_value_1, store_one_arg): Likewise. (target_for_arg): Remove; disabled long ago. * emit-rtl.c (set_mem_attributes): Rework to only call get_mem_attrs once and similar cleanups. (offset_address): Use proper introductory comment. * expr.c (emit_block_move): Use alignment from that of MEM args, not from explicit operand; all callers changed. (clear_storage): Likewise. (expand_assignment): Don't call set_mem_alias_set on to_rtx. (store_field): Remove kludge on alias set used for to_rtx. (highest_pow2_factor, case *_DIV_EXPR): Never return 0. (expand_expr_unaligned): Call set_mem_attributes instead of set_mem_alias_set. * expr.h (emit_block_move, clear_storage): Remove ALIGN argument. * function.c (assign_stack_temp_for_type): Set MEM alignment. (expand_function_end): Track MEM attributes of trampolines. * ifcvt.c (noce_try_cmove_arith): Set alignment of new MEM. * integrate.c (copy_rtx_and_substitute, case CALL): Copy memory attributes from original. * langhooks.c (lang_hook_default_get_alias_set): New function. (hook_get_alias_set_0): New function. * langhooks.h (hook_get_alias_set_0): New declaration. (lang_hook_default_get_alias_set): Likewise. (LANG_HOOKS_GET_ALIAS_SET): New macro; add to initializer. * reload1.c (alter_reg): Use adjust_address_nv. * rtl.c (get_mode_alignment): Moved to here. * rtl.h (MEM_ALIGN): Take default from mode, if not BLKmode, and change default if unknown from 1 to BITS_PER_UNIT. * stor-layout.c (get_mode_alignment): Remove from here. * toplev.h (struct lang_hoks): Add get_alias_set field. * tree.h (lang_get_alias_set): Delete declaration. * config/arc/arc.c (arc_setup_incoming_varags): Set MEM alignment. * config/i386/i386.c (ix86_setup_incoming_varargs): Likewise. (ix86_va_arg): Likewise. * config/i960/i960.c (i960_setup_incoming_varargs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/sparc/sparc.c (sparc_va_arg): Likewise. * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise. (expand_block_move_mem): Remove dead code. * cp/cp-lang.c (cxx_get_alias_set): New function. Point LANG_HOOKS_GET_ALIAS_SET to it. * f/com.c (LANG_HOOKS_GET_ALIAS_SET): New macro. (lang_get_alias_set): Delete. * java/lang.c (lang_get_alias_set): Deleted. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46440 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/langhooks.h')
-rw-r--r--gcc/langhooks.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 0b4d72f6c46..69ff1d819bf 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -22,6 +22,10 @@ Boston, MA 02111-1307, USA. */
#ifndef GCC_LANG_HOOKS_H
#define GCC_LANG_HOOKS_H
+/* Provide a hook routine for alias sets that always returns 1. This is
+ used by languages that haven't deal with alias sets yet. */
+extern HOST_WIDE_INT hook_get_alias_set_0 PARAMS ((tree));
+
/* Note to creators of new hooks:
The macros in this file should NOT be surrounded by a
@@ -33,30 +37,34 @@ Boston, MA 02111-1307, USA. */
extern void lang_hook_default_do_nothing PARAMS ((void));
extern int lang_hook_default_decode_option PARAMS ((int, char **));
+extern HOST_WIDE_INT lang_hook_default_get_alias_set PARAMS ((tree));
#define LANG_HOOKS_INIT lang_hook_default_do_nothing
#define LANG_HOOKS_FINISH lang_hook_default_do_nothing
#define LANG_HOOKS_INIT_OPTIONS lang_hook_default_do_nothing
#define LANG_HOOKS_DECODE_OPTION lang_hook_default_decode_option
#define LANG_HOOKS_POST_OPTIONS lang_hook_default_do_nothing
+#define LANG_HOOKS_GET_ALIAS_SET lang_hook_default_get_alias_set
#define LANG_HOOKS_HONOR_READONLY false
/* Declarations of default tree inlining hooks. */
-tree tree_inlining_default_hook_walk_subtrees PARAMS ((tree*, int *,
- walk_tree_fn,
- void *, void *));
-int tree_inlining_default_hook_cannot_inline_tree_fn PARAMS ((tree*));
-int tree_inlining_default_hook_disregard_inline_limits PARAMS ((tree));
-tree tree_inlining_default_hook_add_pending_fn_decls PARAMS ((void*, tree));
-int tree_inlining_default_hook_tree_chain_matters_p PARAMS ((tree));
-int tree_inlining_default_hook_auto_var_in_fn_p PARAMS ((tree, tree));
+tree tree_inlining_default_hook_walk_subtrees PARAMS ((tree *, int *,
+ walk_tree_fn,
+ void *,
+ void *));
+int tree_inlining_default_hook_cannot_inline_tree_fn PARAMS ((tree *));
+int tree_inlining_default_hook_disregard_inline_limits PARAMS ((tree));
+tree tree_inlining_default_hook_add_pending_fn_decls PARAMS ((void *,
+ tree));
+int tree_inlining_default_hook_tree_chain_matters_p PARAMS ((tree));
+int tree_inlining_default_hook_auto_var_in_fn_p PARAMS ((tree, tree));
tree tree_inlining_default_hook_copy_res_decl_for_inlining PARAMS ((tree, tree,
tree,
void *,
int *,
void *));
-int tree_inlining_default_hook_anon_aggr_type_p PARAMS ((tree));
+int tree_inlining_default_hook_anon_aggr_type_p PARAMS ((tree));
/* Tree inlining hooks. */
#define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES \
@@ -94,6 +102,7 @@ int tree_inlining_default_hook_anon_aggr_type_p PARAMS ((tree));
LANG_HOOKS_INIT_OPTIONS, \
LANG_HOOKS_DECODE_OPTION, \
LANG_HOOKS_POST_OPTIONS, \
+ LANG_HOOKS_GET_ALIAS_SET, \
LANG_HOOKS_HONOR_READONLY, \
LANG_HOOKS_TREE_INLINING_INITIALIZER \
}