summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-11 17:21:56 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-11 17:21:56 +0000
commit32c2fdea992cbeb3eaeca86306603bd3140bc990 (patch)
treed0f0bb94d35f0f3656fa880c6a29ffe6bde7aa38
parent2baac35187a10af6476e379630115b88b0827eb7 (diff)
downloadgcc-32c2fdea992cbeb3eaeca86306603bd3140bc990.tar.gz
./:
* alias.h (alias_set_type): Define new type. (ALIAS_SET_MEMORY_BARRIER): Use it. * rtl.h: Include alias.h. (struct mem_attrs): Use alias_set_type. * tree.h: Include alias.h (struct tree_type): Use alias_set_type. (struct tree_struct_field_tag): Likewise. (struct tree_decl_common): Likewise. * alias.c (struct alias_set_entry): Use alias_set_type. (get_alias_set_entry, alias_set_subset_of): Likewise. (alias_sets_conflict_p): Likewise. (alias_sets_must_conflict_p): Likewise. (objects_must_conflict_p): Likewise. (get_alias_set, new_alias_set): Likewise. (record_alias_subset, record_component_aliases): Likewise. (varargs_set, frame_set): Change to alias_set_type. (get_varargs_alias_set): Use alias_set_type. (get_frame_alias_set): Likewise. * builtins.c (setjmp_alias_set): Change to alias_set_type. * dse.c (struct store_info): Use alias_set_type. (struct read_info, struct clear_alias_mode_holder): Likewise. (clear_alias_set_lookup, canon_address): Likewise. (record_store, check_mem_read_rtx): Likewise. (dse_record_singleton_alias_set): Likewise. (dse_invalidate_singleton_alias_set): Likewise. * emit-rtl.c (get_mem_attrs): Likewise. (set_mem_attributes_minus_bitpos): Likewise. (set_mem_alias_set): Likewise. * expr.c (store_constructor_field, store_field): Likewise. * gimplify.c (struct gimplify_init_ctor_preeval_data): Likewise. * langhooks.c (lhd_get_alias_set): Likewise. * langhooks-def.h (lhd_get_alias_set): Likewise. * reload1.c (alter_reg): Likewise. * tree-flow.h (struct fieldoff): Likewise. * tree-ssa-alias.c (struct alias_map_d): Likewise. (may_alias_p, get_smt_for, create_sft): Likewise. * tree-ssa-alias-warnings.c (nonstandard_alias_types_p): Likewise. * tree-ssa-structalias.c (set_uids_in_ptset): Likewise. (merge_smts_into): Likewise. * varasm.c (const_alias_set): Likewise. * c-common.c (strict_aliasing_warning): Likewise. (c_common_get_alias_set): Likewise. * dse.h (dse_record_singleton_alias_set): Update declaration. (dse_invalidate_singleton_alias_set): Likewise. * emit-rtl.h (set_mem_alias_set): Likewise. * c-common.h (c_common_get_alias_set): Likewise. * print-rtl.c (print_rtx): Cast MEM_ALIAS_SET when printing it. * print-tree.c (print_node): Likewise. * config/alpha/alpha.c (alpha_sr_alias_set): Change to alias_set_type. (alpha_setup_incoming_varargs): Use alias_set_type. * config/i386/i386.c (setup_incoming_varargs_64): Use alias_set_type. (setup_incoming_varargs_ms_64): Likewise. (ix86_GOT_alias_set): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise. (set): Change to alias_set_type. (get_TOC_alias_set): Use alias_set_type. * config/rs6000/rs6000-protos.h (get_TOC_alias_set): Update declaration. * config/sh/sh.c (sh_builtin_saveregs): Use alias_set_type. * config/sparc/sparc.c (sparc_sr_alias_set): Change to alias_set_type. (struct_value_alias_set): Likewise. * Makefile.in (GTFILES): Add $(srcdir)/alias.h. ada/: * misc.c (gnat_get_alias_set): Change return type to alias_set_type. cp/: * cp-objcp-common.c (cxx_get_alias_set): Change return type to alias_set_type. * cp/cp-tree.h (cxx_get_alias_set): Update declaration. fortran:/ * f95-lang.c (gfc_get_alias_set): Change return type to alias_set_type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127362 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog69
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/misc.c4
-rw-r--r--gcc/alias.c36
-rw-r--r--gcc/alias.h13
-rw-r--r--gcc/builtins.c2
-rw-r--r--gcc/c-common.c12
-rw-r--r--gcc/c-common.h2
-rw-r--r--gcc/config/alpha/alpha.c5
-rw-r--r--gcc/config/i386/i386.c8
-rw-r--r--gcc/config/mn10300/mn10300.c2
-rw-r--r--gcc/config/rs6000/rs6000-protos.h2
-rw-r--r--gcc/config/rs6000/rs6000.c7
-rw-r--r--gcc/config/sh/sh.c2
-rw-r--r--gcc/config/sparc/sparc.c4
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/cp-objcp-common.c2
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/dse.c34
-rw-r--r--gcc/dse.h4
-rw-r--r--gcc/emit-rtl.c8
-rw-r--r--gcc/emit-rtl.h2
-rw-r--r--gcc/expr.c11
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/f95-lang.c4
-rw-r--r--gcc/gimplify.c2
-rw-r--r--gcc/langhooks-def.h2
-rw-r--r--gcc/langhooks.c2
-rw-r--r--gcc/langhooks.h2
-rw-r--r--gcc/print-rtl.c3
-rw-r--r--gcc/print-tree.c4
-rw-r--r--gcc/reload1.c6
-rw-r--r--gcc/rtl.h3
-rw-r--r--gcc/tree-flow.h2
-rw-r--r--gcc/tree-ssa-alias-warnings.c4
-rw-r--r--gcc/tree-ssa-alias.c12
-rw-r--r--gcc/tree-ssa-structalias.c6
-rw-r--r--gcc/tree.h13
-rw-r--r--gcc/varasm.c2
40 files changed, 205 insertions, 111 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8afb826970c..a61667ba131 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,72 @@
+2007-08-11 Ian Lance Taylor <iant@google.com>
+
+ * alias.h (alias_set_type): Define new type.
+ (ALIAS_SET_MEMORY_BARRIER): Use it.
+ * rtl.h: Include alias.h.
+ (struct mem_attrs): Use alias_set_type.
+ * tree.h: Include alias.h
+ (struct tree_type): Use alias_set_type.
+ (struct tree_struct_field_tag): Likewise.
+ (struct tree_decl_common): Likewise.
+ * alias.c (struct alias_set_entry): Use alias_set_type.
+ (get_alias_set_entry, alias_set_subset_of): Likewise.
+ (alias_sets_conflict_p): Likewise.
+ (alias_sets_must_conflict_p): Likewise.
+ (objects_must_conflict_p): Likewise.
+ (get_alias_set, new_alias_set): Likewise.
+ (record_alias_subset, record_component_aliases): Likewise.
+ (varargs_set, frame_set): Change to alias_set_type.
+ (get_varargs_alias_set): Use alias_set_type.
+ (get_frame_alias_set): Likewise.
+ * builtins.c (setjmp_alias_set): Change to alias_set_type.
+ * dse.c (struct store_info): Use alias_set_type.
+ (struct read_info, struct clear_alias_mode_holder): Likewise.
+ (clear_alias_set_lookup, canon_address): Likewise.
+ (record_store, check_mem_read_rtx): Likewise.
+ (dse_record_singleton_alias_set): Likewise.
+ (dse_invalidate_singleton_alias_set): Likewise.
+ * emit-rtl.c (get_mem_attrs): Likewise.
+ (set_mem_attributes_minus_bitpos): Likewise.
+ (set_mem_alias_set): Likewise.
+ * expr.c (store_constructor_field, store_field): Likewise.
+ * gimplify.c (struct gimplify_init_ctor_preeval_data): Likewise.
+ * langhooks.c (lhd_get_alias_set): Likewise.
+ * langhooks-def.h (lhd_get_alias_set): Likewise.
+ * reload1.c (alter_reg): Likewise.
+ * tree-flow.h (struct fieldoff): Likewise.
+ * tree-ssa-alias.c (struct alias_map_d): Likewise.
+ (may_alias_p, get_smt_for, create_sft): Likewise.
+ * tree-ssa-alias-warnings.c (nonstandard_alias_types_p): Likewise.
+ * tree-ssa-structalias.c (set_uids_in_ptset): Likewise.
+ (merge_smts_into): Likewise.
+ * varasm.c (const_alias_set): Likewise.
+ * c-common.c (strict_aliasing_warning): Likewise.
+ (c_common_get_alias_set): Likewise.
+ * dse.h (dse_record_singleton_alias_set): Update declaration.
+ (dse_invalidate_singleton_alias_set): Likewise.
+ * emit-rtl.h (set_mem_alias_set): Likewise.
+ * c-common.h (c_common_get_alias_set): Likewise.
+ * print-rtl.c (print_rtx): Cast MEM_ALIAS_SET when printing it.
+ * print-tree.c (print_node): Likewise.
+ * config/alpha/alpha.c (alpha_sr_alias_set): Change to
+ alias_set_type.
+ (alpha_setup_incoming_varargs): Use alias_set_type.
+ * config/i386/i386.c (setup_incoming_varargs_64): Use
+ alias_set_type.
+ (setup_incoming_varargs_ms_64): Likewise.
+ (ix86_GOT_alias_set): Likewise.
+ * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise.
+ * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise.
+ (set): Change to alias_set_type.
+ (get_TOC_alias_set): Use alias_set_type.
+ * config/rs6000/rs6000-protos.h (get_TOC_alias_set): Update
+ declaration.
+ * config/sh/sh.c (sh_builtin_saveregs): Use alias_set_type.
+ * config/sparc/sparc.c (sparc_sr_alias_set): Change to
+ alias_set_type.
+ (struct_value_alias_set): Likewise.
+ * Makefile.in (GTFILES): Add $(srcdir)/alias.h.
+
2007-08-11 Richard Sandiford <richard@codesourcery.com>
* config/vxworks-dummy.h (TARGET_VXWORKS): Define.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 7dafff67015..de3a9e3d002 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3038,7 +3038,7 @@ s-constrs-h: $(MD_DEPS) build/genpreds$(build_exeext)
GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
$(CPP_ID_DATA_H) $(host_xm_file_list) \
$(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
- $(srcdir)/coverage.c $(srcdir)/rtl.h \
+ $(srcdir)/alias.h $(srcdir)/coverage.c $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/function.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
$(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
$(srcdir)/fixed-value.h \
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 32b144f68bb..e27901c2934 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-11 Ian Lance Taylor <iant@google.com>
+
+ * misc.c (gnat_get_alias_set): Change return type to
+ alias_set_type.
+
2007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* decl.c, utils2.c: Fix whitespace in last change.
diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c
index 24d450e9640..5f1ae85e5c7 100644
--- a/gcc/ada/misc.c
+++ b/gcc/ada/misc.c
@@ -90,7 +90,7 @@ static void gnat_finish_incomplete_decl (tree);
static unsigned int gnat_init_options (unsigned int, const char **);
static int gnat_handle_option (size_t, const char *, int);
static bool gnat_post_options (const char **);
-static HOST_WIDE_INT gnat_get_alias_set (tree);
+static alias_set_type gnat_get_alias_set (tree);
static void gnat_print_decl (FILE *, tree, int);
static void gnat_print_type (FILE *, tree, int);
static const char *gnat_printable_name (tree, int);
@@ -739,7 +739,7 @@ gnat_eh_type_covers (tree a, tree b)
/* Get the alias set corresponding to a type or expression. */
-static HOST_WIDE_INT
+static alias_set_type
gnat_get_alias_set (tree type)
{
/* If this is a padding type, use the type of the first field. */
diff --git a/gcc/alias.c b/gcc/alias.c
index 689c944c54e..518164e4dcd 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -131,7 +131,7 @@ along with GCC; see the file COPYING3. If not see
struct alias_set_entry GTY(())
{
/* The alias set number, as stored in MEM_ALIAS_SET. */
- HOST_WIDE_INT alias_set;
+ alias_set_type alias_set;
/* The children of the alias set. These are not just the immediate
children, but, in fact, all descendants. So, if we have:
@@ -157,7 +157,7 @@ static rtx find_base_value (rtx);
static int mems_in_disjoint_alias_sets_p (const_rtx, const_rtx);
static int insert_subset_children (splay_tree_node, void*);
static tree find_base_decl (tree);
-static alias_set_entry get_alias_set_entry (HOST_WIDE_INT);
+static alias_set_entry get_alias_set_entry (alias_set_type);
static const_rtx fixed_scalar_and_varying_struct_p (const_rtx, const_rtx, rtx, rtx,
bool (*) (const_rtx, bool));
static int aliases_everything_p (const_rtx);
@@ -168,7 +168,7 @@ static int nonoverlapping_memrefs_p (const_rtx, const_rtx);
static int write_dependence_p (const_rtx, const_rtx, int);
static void memory_modified_1 (rtx, const_rtx, void *);
-static void record_alias_subset (HOST_WIDE_INT, HOST_WIDE_INT);
+static void record_alias_subset (alias_set_type, alias_set_type);
/* Set up all info needed to perform alias analysis on memory references. */
@@ -257,7 +257,7 @@ static GTY (()) VEC(alias_set_entry,gc) *alias_sets;
such an entry, or NULL otherwise. */
static inline alias_set_entry
-get_alias_set_entry (HOST_WIDE_INT alias_set)
+get_alias_set_entry (alias_set_type alias_set)
{
return VEC_index (alias_set_entry, alias_sets, alias_set);
}
@@ -295,7 +295,7 @@ insert_subset_children (splay_tree_node node, void *data)
/* Return true if the first alias set is a subset of the second. */
bool
-alias_set_subset_of (HOST_WIDE_INT set1, HOST_WIDE_INT set2)
+alias_set_subset_of (alias_set_type set1, alias_set_type set2)
{
alias_set_entry ase;
@@ -315,7 +315,7 @@ alias_set_subset_of (HOST_WIDE_INT set1, HOST_WIDE_INT set2)
/* Return 1 if the two specified alias sets may conflict. */
int
-alias_sets_conflict_p (HOST_WIDE_INT set1, HOST_WIDE_INT set2)
+alias_sets_conflict_p (alias_set_type set1, alias_set_type set2)
{
alias_set_entry ase;
@@ -347,7 +347,7 @@ alias_sets_conflict_p (HOST_WIDE_INT set1, HOST_WIDE_INT set2)
/* Return 1 if the two specified alias sets will always conflict. */
int
-alias_sets_must_conflict_p (HOST_WIDE_INT set1, HOST_WIDE_INT set2)
+alias_sets_must_conflict_p (alias_set_type set1, alias_set_type set2)
{
if (set1 == 0 || set2 == 0 || set1 == set2)
return 1;
@@ -363,7 +363,7 @@ alias_sets_must_conflict_p (HOST_WIDE_INT set1, HOST_WIDE_INT set2)
int
objects_must_conflict_p (tree t1, tree t2)
{
- HOST_WIDE_INT set1, set2;
+ alias_set_type set1, set2;
/* If neither has a type specified, we don't know if they'll conflict
because we may be using them to store objects of various types, for
@@ -485,10 +485,10 @@ component_uses_parent_alias_set (tree t)
/* Return the alias set for T, which may be either a type or an
expression. Call language-specific routine for help, if needed. */
-HOST_WIDE_INT
+alias_set_type
get_alias_set (tree t)
{
- HOST_WIDE_INT set;
+ alias_set_type set;
/* If we're not doing any alias analysis, just assume everything
aliases everything else. Also return 0 if this or its type is
@@ -541,7 +541,7 @@ get_alias_set (tree t)
alias set for the restricted pointer a subset of the
alias set for the type pointed to by the type of the
decl. */
- HOST_WIDE_INT pointed_to_alias_set
+ alias_set_type pointed_to_alias_set
= get_alias_set (pointed_to_type);
if (pointed_to_alias_set == 0)
@@ -646,7 +646,7 @@ get_alias_set (tree t)
/* Return a brand-new alias set. */
-HOST_WIDE_INT
+alias_set_type
new_alias_set (void)
{
if (flag_strict_aliasing)
@@ -674,7 +674,7 @@ new_alias_set (void)
subset of alias set zero. */
static void
-record_alias_subset (HOST_WIDE_INT superset, HOST_WIDE_INT subset)
+record_alias_subset (alias_set_type superset, alias_set_type subset)
{
alias_set_entry superset_entry;
alias_set_entry subset_entry;
@@ -730,7 +730,7 @@ record_alias_subset (HOST_WIDE_INT superset, HOST_WIDE_INT subset)
void
record_component_aliases (tree type)
{
- HOST_WIDE_INT superset = get_alias_set (type);
+ alias_set_type superset = get_alias_set (type);
tree field;
if (superset == 0)
@@ -774,9 +774,9 @@ record_component_aliases (tree type)
/* Allocate an alias set for use in storing and reading from the varargs
spill area. */
-static GTY(()) HOST_WIDE_INT varargs_set = -1;
+static GTY(()) alias_set_type varargs_set = -1;
-HOST_WIDE_INT
+alias_set_type
get_varargs_alias_set (void)
{
#if 1
@@ -796,9 +796,9 @@ get_varargs_alias_set (void)
/* Likewise, but used for the fixed portions of the frame, e.g., register
save areas. */
-static GTY(()) HOST_WIDE_INT frame_set = -1;
+static GTY(()) alias_set_type frame_set = -1;
-HOST_WIDE_INT
+alias_set_type
get_frame_alias_set (void)
{
if (frame_set == -1)
diff --git a/gcc/alias.h b/gcc/alias.h
index f53bebaefac..a0511c14a46 100644
--- a/gcc/alias.h
+++ b/gcc/alias.h
@@ -20,16 +20,19 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_ALIAS_H
#define GCC_ALIAS_H
-extern HOST_WIDE_INT new_alias_set (void);
-extern HOST_WIDE_INT get_varargs_alias_set (void);
-extern HOST_WIDE_INT get_frame_alias_set (void);
+/* The type of an alias set. */
+typedef HOST_WIDE_INT alias_set_type;
+
+extern alias_set_type new_alias_set (void);
+extern alias_set_type get_varargs_alias_set (void);
+extern alias_set_type get_frame_alias_set (void);
extern bool component_uses_parent_alias_set (tree);
-extern bool alias_set_subset_of (HOST_WIDE_INT, HOST_WIDE_INT);
+extern bool alias_set_subset_of (alias_set_type, alias_set_type);
/* This alias set can be used to force a memory to conflict with all
other memories, creating a barrier across which no memory reference
can move. Note that there are other legacy ways to create such
memory barriers, including an address of SCRATCH. */
-#define ALIAS_SET_MEMORY_BARRIER ((HOST_WIDE_INT) -1)
+#define ALIAS_SET_MEMORY_BARRIER ((alias_set_type) -1)
#endif /* GCC_ALIAS_H */
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 48350d7fdf4..cbe00c7dd3b 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -644,7 +644,7 @@ expand_builtin_return_addr (enum built_in_function fndecl_code, int count)
}
/* Alias set used for setjmp buffer. */
-static HOST_WIDE_INT setjmp_alias_set = -1;
+static alias_set_type setjmp_alias_set = -1;
/* Construct the leading half of a __builtin_setjmp call. Control will
return to RECEIVER_LABEL. This is also called directly by the SJLJ
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 8d20efdaf32..f3bfb3d9f3b 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1043,9 +1043,9 @@ strict_aliasing_warning (tree otype, tree type, tree expr)
{
/* warn_strict_aliasing >= 3. This includes the default (3).
Only warn if the cast is dereferenced immediately. */
- HOST_WIDE_INT set1 =
+ alias_set_type set1 =
get_alias_set (TREE_TYPE (TREE_OPERAND (expr, 0)));
- HOST_WIDE_INT set2 = get_alias_set (TREE_TYPE (type));
+ alias_set_type set2 = get_alias_set (TREE_TYPE (type));
if (!alias_sets_conflict_p (set1, set2))
{
@@ -1069,9 +1069,9 @@ strict_aliasing_warning (tree otype, tree type, tree expr)
not taken in the same statement. This will likely produce many
false positives, but could be useful to pinpoint problems that
are not revealed at higher levels. */
- HOST_WIDE_INT set1 = get_alias_set (TREE_TYPE (otype));
- HOST_WIDE_INT set2 = get_alias_set (TREE_TYPE (type));
- if (!COMPLETE_TYPE_P(type)
+ alias_set_type set1 = get_alias_set (TREE_TYPE (otype));
+ alias_set_type set2 = get_alias_set (TREE_TYPE (type));
+ if (!COMPLETE_TYPE_P (type)
|| !alias_sets_must_conflict_p (set1, set2))
{
warning (OPT_Wstrict_aliasing, "dereferencing type-punned "
@@ -3048,7 +3048,7 @@ static GTY((param_is (union tree_node))) htab_t type_hash_table;
/* 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. */
-HOST_WIDE_INT
+alias_set_type
c_common_get_alias_set (tree t)
{
tree u;
diff --git a/gcc/c-common.h b/gcc/c-common.h
index cb2c56bf5b8..8908327698f 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -730,7 +730,7 @@ extern bool c_common_post_options (const char **);
extern bool c_common_init (void);
extern void c_common_finish (void);
extern void c_common_parse_file (int);
-extern HOST_WIDE_INT c_common_get_alias_set (tree);
+extern alias_set_type c_common_get_alias_set (tree);
extern void c_register_builtin_type (tree, const char*);
extern bool c_promoting_integer_type_p (tree);
extern int self_promoting_args_p (tree);
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 3695a711e3d..e699fcf28a4 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -100,7 +100,7 @@ static int alpha_function_needs_gp;
/* The alias set for prologue/epilogue register save/restore. */
-static GTY(()) int alpha_sr_alias_set;
+static GTY(()) alias_set_type alpha_sr_alias_set;
/* The assembler name of the current function. */
@@ -6022,7 +6022,8 @@ alpha_setup_incoming_varargs (CUMULATIVE_ARGS *pcum, enum machine_mode mode,
if (!no_rtl)
{
- int count, set = get_varargs_alias_set ();
+ int count;
+ alias_set_type set = get_varargs_alias_set ();
rtx tmp;
count = cfun->va_list_gpr_size / UNITS_PER_WORD;
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index de03780454f..602b555c521 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4686,7 +4686,7 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum)
rtx label_ref;
rtx tmp_reg;
rtx nsse_reg;
- int set;
+ alias_set_type set;
int i;
if (! cfun->va_list_gpr_size && ! cfun->va_list_fpr_size)
@@ -4769,7 +4769,7 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum)
static void
setup_incoming_varargs_ms_64 (CUMULATIVE_ARGS *cum)
{
- int set = get_varargs_alias_set ();
+ alias_set_type set = get_varargs_alias_set ();
int i;
for (i = cum->regno; i < REGPARM_MAX; i++)
@@ -7180,10 +7180,10 @@ legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
/* Return a unique alias set for the GOT. */
-static HOST_WIDE_INT
+static alias_set_type
ix86_GOT_alias_set (void)
{
- static HOST_WIDE_INT set = -1;
+ static alias_set_type set = -1;
if (set == -1)
set = new_alias_set ();
return set;
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index fcf5144b635..5e20edff352 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -1450,7 +1450,7 @@ mn10300_builtin_saveregs (void)
&& (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
!= void_type_node)))
? UNITS_PER_WORD : 0);
- int set = get_varargs_alias_set ();
+ alias_set_type set = get_varargs_alias_set ();
if (argadj)
offset = plus_constant (current_function_arg_offset_rtx, argadj);
diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h
index 0f5412cc079..d759c367c98 100644
--- a/gcc/config/rs6000/rs6000-protos.h
+++ b/gcc/config/rs6000/rs6000-protos.h
@@ -146,7 +146,7 @@ extern void rs6000_gen_section_name (char **, const char *, const char *);
extern void output_function_profiler (FILE *, int);
extern void output_profile_hook (int);
extern int rs6000_trampoline_size (void);
-extern int get_TOC_alias_set (void);
+extern alias_set_type get_TOC_alias_set (void);
extern void rs6000_emit_prologue (void);
extern void rs6000_emit_load_toc_table (int);
extern void rs6000_aix_emit_builtin_unwind_init (void);
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index d26da5272ee..40104e1f86e 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -6092,7 +6092,8 @@ setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
CUMULATIVE_ARGS next_cum;
int reg_size = TARGET_32BIT ? 4 : 8;
rtx save_area = NULL_RTX, mem;
- int first_reg_offset, set;
+ int first_reg_offset;
+ alias_set_type set;
/* Skip the last named argument. */
next_cum = *cum;
@@ -14293,9 +14294,9 @@ rs6000_emit_eh_reg_restore (rtx source, rtx scratch)
emit_move_insn (gen_rtx_REG (Pmode, LR_REGNO), operands[0]);
}
-static GTY(()) int set = -1;
+static GTY(()) alias_set_type set = -1;
-int
+alias_set_type
get_TOC_alias_set (void)
{
if (set == -1)
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 290d3f05d3b..f5e0f6a1c14 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -6853,7 +6853,7 @@ sh_builtin_saveregs (void)
int n_floatregs = MAX (0, NPARM_REGS (SFmode) - first_floatreg);
rtx regbuf, fpregs;
int bufsize, regno;
- HOST_WIDE_INT alias_set;
+ alias_set_type alias_set;
if (TARGET_SH5)
{
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index f791199c54f..0b27b87a2e2 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -251,10 +251,10 @@ static HOST_WIDE_INT actual_fsize;
static int num_gfregs;
/* The alias set for prologue/epilogue register save/restore. */
-static GTY(()) int sparc_sr_alias_set;
+static GTY(()) alias_set_type sparc_sr_alias_set;
/* The alias set for the structure return value. */
-static GTY(()) int struct_value_alias_set;
+static GTY(()) alias_set_type struct_value_alias_set;
/* Save the operands last given to a compare for use when we
generate a scc or bcc insn. */
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1855f5a481a..f7587f915d3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-11 Ian Lance Taylor <iant@google.com>
+
+ * cp-objcp-common.c (cxx_get_alias_set): Change return type to
+ alias_set_type.
+ * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
+
2007-08-10 Ollie Wild <aaw@google.com>
* name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index 701e06d01fb..a4c63f1407a 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
/* Special routine to get the alias set for C++. */
-HOST_WIDE_INT
+alias_set_type
cxx_get_alias_set (tree t)
{
if (IS_FAKE_BASE_TYPE (t))
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index f1dcce7cd1b..9a28ac17cd2 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4858,7 +4858,7 @@ extern bool cp_dump_tree (void *, tree);
/* In cp/cp-objcp-common.c. */
-extern HOST_WIDE_INT cxx_get_alias_set (tree);
+extern alias_set_type cxx_get_alias_set (tree);
extern bool cxx_warn_unused_global_decl (tree);
extern tree cp_expr_size (tree);
extern size_t cp_tree_size (enum tree_code);
diff --git a/gcc/dse.c b/gcc/dse.c
index e006f075023..f8859f6c91d 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -218,7 +218,7 @@ struct store_info
rtx mem_addr;
/* If this is non-zero, it is the alias set of a spill location. */
- HOST_WIDE_INT alias_set;
+ alias_set_type alias_set;
/* The offset of the first and byte before the last byte associated
with the operation. */
@@ -250,7 +250,7 @@ struct read_info
int group_id;
/* If this is non-zero, it is the alias set of a spill location. */
- HOST_WIDE_INT alias_set;
+ alias_set_type alias_set;
/* The offset of the first and byte after the last byte associated
with the operation. If begin == end == 0, the read did not have
@@ -497,7 +497,7 @@ static htab_t clear_alias_mode_table;
/* Hash table element to look up the mode for an alias set. */
struct clear_alias_mode_holder
{
- HOST_WIDE_INT alias_set;
+ alias_set_type alias_set;
enum machine_mode mode;
};
@@ -556,7 +556,7 @@ clear_alias_mode_hash (const void *p)
/* Find the entry associated with ALIAS_SET. */
static struct clear_alias_mode_holder *
-clear_alias_set_lookup (HOST_WIDE_INT alias_set)
+clear_alias_set_lookup (alias_set_type alias_set)
{
struct clear_alias_mode_holder tmp_holder;
void **slot;
@@ -845,7 +845,7 @@ delete_dead_store_insn (insn_info_t insn_info)
INSN_UID (insn_info->insn));
if (insn_info->store_rec->alias_set)
fprintf (dump_file, "alias set %d\n",
- (int)insn_info->store_rec->alias_set);
+ (int) insn_info->store_rec->alias_set);
else
fprintf (dump_file, "\n");
}
@@ -927,7 +927,7 @@ add_wild_read (bb_info_t bb_info)
while (*ptr)
{
read_info_t next = (*ptr)->next;
- if ( (*ptr)->alias_set == 0 )
+ if ((*ptr)->alias_set == 0)
{
pool_free (read_info_pool, *ptr);
*ptr = next;
@@ -996,7 +996,7 @@ const_or_frame_p (rtx x)
static bool
canon_address (rtx mem,
- HOST_WIDE_INT *alias_set_out,
+ alias_set_type *alias_set_out,
int *group_id,
HOST_WIDE_INT *offset,
cselib_val **base)
@@ -1009,9 +1009,9 @@ canon_address (rtx mem,
if (clear_alias_sets)
{
/* If this is a spill, do not do any further processing. */
- HOST_WIDE_INT alias_set = MEM_ALIAS_SET (mem);
+ alias_set_type alias_set = MEM_ALIAS_SET (mem);
if (dump_file)
- fprintf (dump_file, "found alias set %d\n", (int)alias_set);
+ fprintf (dump_file, "found alias set %d\n", (int) alias_set);
if (bitmap_bit_p (clear_alias_sets, alias_set))
{
struct clear_alias_mode_holder *entry
@@ -1023,7 +1023,7 @@ canon_address (rtx mem,
if (dump_file)
fprintf (dump_file,
"disqualifying alias set %d, (%s) != (%s)\n",
- (int)alias_set, GET_MODE_NAME (entry->mode),
+ (int) alias_set, GET_MODE_NAME (entry->mode),
GET_MODE_NAME (GET_MODE (mem)));
bitmap_set_bit (disqualified_clear_alias_sets, alias_set);
@@ -1148,7 +1148,7 @@ record_store (rtx body, bb_info_t bb_info)
rtx mem;
HOST_WIDE_INT offset = 0;
HOST_WIDE_INT width = 0;
- HOST_WIDE_INT spill_alias_set;
+ alias_set_type spill_alias_set;
insn_info_t insn_info = bb_info->last_insn;
store_info_t store_info = NULL;
int group_id;
@@ -1225,7 +1225,7 @@ record_store (rtx body, bb_info_t bb_info)
if (dump_file)
fprintf (dump_file, " processing spill store %d(%s)\n",
- (int)spill_alias_set, GET_MODE_NAME (GET_MODE (mem)));
+ (int) spill_alias_set, GET_MODE_NAME (GET_MODE (mem)));
}
else if (group_id >= 0)
{
@@ -1289,7 +1289,7 @@ record_store (rtx body, bb_info_t bb_info)
}
if (dump_file)
fprintf (dump_file, " trying spill store in insn=%d alias_set=%d\n",
- INSN_UID (ptr->insn), (int)s_info->alias_set);
+ INSN_UID (ptr->insn), (int) s_info->alias_set);
}
else if ((s_info->group_id == group_id)
&& (s_info->cse_base == base))
@@ -1488,7 +1488,7 @@ check_mem_read_rtx (rtx *loc, void *data)
insn_info_t insn_info;
HOST_WIDE_INT offset = 0;
HOST_WIDE_INT width = 0;
- HOST_WIDE_INT spill_alias_set = 0;
+ alias_set_type spill_alias_set = 0;
cselib_val *base = NULL;
int group_id;
read_info_t read_info;
@@ -1546,7 +1546,7 @@ check_mem_read_rtx (rtx *loc, void *data)
if (dump_file)
fprintf (dump_file, " processing spill load %d\n",
- (int)spill_alias_set);
+ (int) spill_alias_set);
while (i_ptr)
{
@@ -2187,7 +2187,7 @@ dse_step2_spill (void)
void
-dse_record_singleton_alias_set (HOST_WIDE_INT alias_set,
+dse_record_singleton_alias_set (alias_set_type alias_set,
enum machine_mode mode)
{
struct clear_alias_mode_holder tmp_holder;
@@ -2225,7 +2225,7 @@ dse_record_singleton_alias_set (HOST_WIDE_INT alias_set,
/* Remove ALIAS_SET from the sets of stack slots being considered. */
void
-dse_invalidate_singleton_alias_set (HOST_WIDE_INT alias_set)
+dse_invalidate_singleton_alias_set (alias_set_type alias_set)
{
if ((!gate_dse()) || !alias_set)
return;
diff --git a/gcc/dse.h b/gcc/dse.h
index ebd007c232b..862eacadc1e 100644
--- a/gcc/dse.h
+++ b/gcc/dse.h
@@ -25,8 +25,8 @@ along with GCC; see the file COPYING3. If not see
struct df;
-extern void dse_record_singleton_alias_set (HOST_WIDE_INT, enum machine_mode);
-extern void dse_invalidate_singleton_alias_set (HOST_WIDE_INT);
+extern void dse_record_singleton_alias_set (alias_set_type, enum machine_mode);
+extern void dse_invalidate_singleton_alias_set (alias_set_type);
#endif /* GCC_DSE_H */
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 803f7401682..f1b1990eeac 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -181,7 +181,7 @@ static int const_double_htab_eq (const void *, const void *);
static rtx lookup_const_double (rtx);
static hashval_t mem_attrs_htab_hash (const void *);
static int mem_attrs_htab_eq (const void *, const void *);
-static mem_attrs *get_mem_attrs (HOST_WIDE_INT, tree, rtx, rtx, unsigned int,
+static mem_attrs *get_mem_attrs (alias_set_type, tree, rtx, rtx, unsigned int,
enum machine_mode);
static hashval_t reg_attrs_htab_hash (const void *);
static int reg_attrs_htab_eq (const void *, const void *);
@@ -282,7 +282,7 @@ mem_attrs_htab_eq (const void *x, const void *y)
MEM of mode MODE. */
static mem_attrs *
-get_mem_attrs (HOST_WIDE_INT alias, tree expr, rtx offset, rtx size,
+get_mem_attrs (alias_set_type alias, tree expr, rtx offset, rtx size,
unsigned int align, enum machine_mode mode)
{
mem_attrs attrs;
@@ -1469,7 +1469,7 @@ void
set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
HOST_WIDE_INT bitpos)
{
- HOST_WIDE_INT alias = MEM_ALIAS_SET (ref);
+ alias_set_type alias = MEM_ALIAS_SET (ref);
tree expr = MEM_EXPR (ref);
rtx offset = MEM_OFFSET (ref);
rtx size = MEM_SIZE (ref);
@@ -1748,7 +1748,7 @@ set_mem_attrs_from_reg (rtx mem, rtx reg)
/* Set the alias set of MEM to SET. */
void
-set_mem_alias_set (rtx mem, HOST_WIDE_INT set)
+set_mem_alias_set (rtx mem, alias_set_type set)
{
#ifdef ENABLE_CHECKING
/* If the new and old alias sets don't conflict, something is wrong. */
diff --git a/gcc/emit-rtl.h b/gcc/emit-rtl.h
index ce38637d73f..32f5c91d630 100644
--- a/gcc/emit-rtl.h
+++ b/gcc/emit-rtl.h
@@ -21,7 +21,7 @@ along with GCC; see the file COPYING3. If not see
#define GCC_EMIT_RTL_H
/* Set the alias set of MEM to SET. */
-extern void set_mem_alias_set (rtx, HOST_WIDE_INT);
+extern void set_mem_alias_set (rtx, alias_set_type);
/* Set the alignment of MEM to ALIGN bits. */
extern void set_mem_align (rtx, unsigned int);
diff --git a/gcc/expr.c b/gcc/expr.c
index a002b0d30ec..04a96633f61 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -139,10 +139,10 @@ static rtx compress_float_constant (rtx, rtx);
static rtx get_subtarget (rtx);
static void store_constructor_field (rtx, unsigned HOST_WIDE_INT,
HOST_WIDE_INT, enum machine_mode,
- tree, tree, int, int);
+ tree, tree, int, alias_set_type);
static void store_constructor (tree, rtx, int, HOST_WIDE_INT);
static rtx store_field (rtx, HOST_WIDE_INT, HOST_WIDE_INT, enum machine_mode,
- tree, tree, int, bool);
+ tree, tree, alias_set_type, bool);
static unsigned HOST_WIDE_INT highest_pow2_factor_for_target (const_tree, const_tree);
@@ -4960,7 +4960,8 @@ all_zeros_p (tree exp)
static void
store_constructor_field (rtx target, unsigned HOST_WIDE_INT bitsize,
HOST_WIDE_INT bitpos, enum machine_mode mode,
- tree exp, tree type, int cleared, int alias_set)
+ tree exp, tree type, int cleared,
+ alias_set_type alias_set)
{
if (TREE_CODE (exp) == CONSTRUCTOR
/* We can only call store_constructor recursively if the size and
@@ -5580,8 +5581,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
static rtx
store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
- enum machine_mode mode, tree exp, tree type, int alias_set,
- bool nontemporal)
+ enum machine_mode mode, tree exp, tree type,
+ alias_set_type alias_set, bool nontemporal)
{
HOST_WIDE_INT width_mask = 0;
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d768b08e4da..51b047b528d 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-11 Ian Lance Taylor <iant@google.com>
+
+ * f95-lang.c (gfc_get_alias_set): Change return type to
+ alias_set_type.
+
2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/31270
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index 425f4d3fecd..cc660fb9e47 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -99,7 +99,7 @@ void insert_block (tree);
static void gfc_clear_binding_stack (void);
static void gfc_be_parse_file (int);
static void gfc_expand_function (tree);
-static HOST_WIDE_INT gfc_get_alias_set (tree);
+static alias_set_type gfc_get_alias_set (tree);
#undef LANG_HOOKS_NAME
#undef LANG_HOOKS_INIT
@@ -706,7 +706,7 @@ gfc_mark_addressable (tree exp)
/* 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. */
-static HOST_WIDE_INT
+static alias_set_type
gfc_get_alias_set (tree t)
{
tree u;
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index c6c0788d721..15c9b91ceb5 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2691,7 +2691,7 @@ struct gimplify_init_ctor_preeval_data
tree lhs_base_decl;
/* The alias set of the lhs object. */
- int lhs_alias_set;
+ alias_set_type lhs_alias_set;
};
static tree
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index a08e1b0aa1c..0866a4c9bda 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -39,7 +39,7 @@ extern void lhd_do_nothing_t (tree);
extern void lhd_do_nothing_i (int);
extern void lhd_do_nothing_f (struct function *);
extern bool lhd_post_options (const char **);
-extern HOST_WIDE_INT lhd_get_alias_set (tree);
+extern alias_set_type lhd_get_alias_set (tree);
extern tree lhd_return_tree (tree);
extern tree lhd_return_null_tree_v (void);
extern tree lhd_return_null_tree (tree);
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index d47a993637a..1c9a6132c5e 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -218,7 +218,7 @@ lhd_incomplete_type_error (tree ARG_UNUSED (value), tree type)
/* Provide a default routine for alias sets that always returns -1. This
is used by languages that don't need to do anything special. */
-HOST_WIDE_INT
+alias_set_type
lhd_get_alias_set (tree ARG_UNUSED (t))
{
return -1;
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 68c20ff0cb9..ed036474bda 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -284,7 +284,7 @@ struct lang_hooks
/* Called to obtain the alias set to be used for an expression or type.
Returns -1 if the language does nothing special for it. */
- HOST_WIDE_INT (*get_alias_set) (tree);
+ alias_set_type (*get_alias_set) (tree);
/* Called with an expression that is to be processed as a constant.
Returns either the same expression or a language-independent
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 10392f50495..2891967390e 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -536,7 +536,8 @@ print_rtx (const_rtx in_rtx)
{
#ifndef GENERATOR_FILE
case MEM:
- fprintf (outfile, " [" HOST_WIDE_INT_PRINT_DEC, MEM_ALIAS_SET (in_rtx));
+ fprintf (outfile, " [" HOST_WIDE_INT_PRINT_DEC,
+ (HOST_WIDE_INT) MEM_ALIAS_SET (in_rtx));
if (MEM_EXPR (in_rtx))
print_mem_expr (outfile, MEM_EXPR (in_rtx));
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index 55efdf4cc4f..22a1e2e8204 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -473,7 +473,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
if (DECL_POINTER_ALIAS_SET_KNOWN_P (node))
fprintf (file, " alias set " HOST_WIDE_INT_PRINT_DEC,
- DECL_POINTER_ALIAS_SET (node));
+ (HOST_WIDE_INT) DECL_POINTER_ALIAS_SET (node));
}
if (TREE_CODE (node) == FIELD_DECL)
{
@@ -614,7 +614,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
fprintf (file, " align %d symtab %d alias set " HOST_WIDE_INT_PRINT_DEC,
TYPE_ALIGN (node), TYPE_SYMTAB_ADDRESS (node),
- TYPE_ALIAS_SET (node));
+ (HOST_WIDE_INT) TYPE_ALIAS_SET (node));
if (TYPE_STRUCTURAL_EQUALITY_P (node))
fprintf (file, " structural equality");
diff --git a/gcc/reload1.c b/gcc/reload1.c
index e41dc9a8cfe..319ba13f1f7 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2076,7 +2076,7 @@ alter_reg (int i, int from_reg)
inherent space, and no less total space, then the previous slot. */
if (from_reg == -1)
{
- HOST_WIDE_INT alias_set = new_alias_set ();
+ alias_set_type alias_set = new_alias_set ();
/* No known place to spill from => no slot to reuse. */
x = assign_stack_local (mode, total_size,
@@ -2128,14 +2128,14 @@ alter_reg (int i, int from_reg)
/* All pseudos mapped to this slot can alias each other. */
if (spill_stack_slot[from_reg])
{
- HOST_WIDE_INT alias_set
+ alias_set_type alias_set
= MEM_ALIAS_SET (spill_stack_slot[from_reg]);
set_mem_alias_set (x, alias_set);
dse_invalidate_singleton_alias_set (alias_set);
}
else
{
- HOST_WIDE_INT alias_set = new_alias_set ();
+ alias_set_type alias_set = new_alias_set ();
set_mem_alias_set (x, alias_set);
dse_record_singleton_alias_set (alias_set, mode);
}
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 3a57d52727e..a7b5f337e21 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "input.h"
#include "real.h"
#include "vec.h"
+#include "alias.h"
#undef FFS /* Some systems predefine this symbol; don't let it interfere. */
#undef FLOAT /* Likewise. */
@@ -139,7 +140,7 @@ typedef struct
stricter alignment; OFFSET is the offset of the MEM within that object. */
typedef struct mem_attrs GTY(())
{
- HOST_WIDE_INT alias; /* Memory alias set. */
+ alias_set_type alias; /* Memory alias set. */
tree expr; /* expr corresponding to MEM. */
rtx offset; /* Offset from start of DECL, as CONST_INT. */
rtx size; /* Size in bytes, as a CONST_INT. */
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 204a6688318..d7e7bf5cb12 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -1159,7 +1159,7 @@ struct fieldoff
tree size;
tree decl;
HOST_WIDE_INT offset;
- HOST_WIDE_INT alias_set;
+ alias_set_type alias_set;
};
typedef struct fieldoff fieldoff_s;
diff --git a/gcc/tree-ssa-alias-warnings.c b/gcc/tree-ssa-alias-warnings.c
index 90484b10a5c..05d215c0f28 100644
--- a/gcc/tree-ssa-alias-warnings.c
+++ b/gcc/tree-ssa-alias-warnings.c
@@ -835,8 +835,8 @@ strict_aliasing_warn (tree alias_site,
static bool
nonstandard_alias_types_p (tree type1, tree type2)
{
- HOST_WIDE_INT set1;
- HOST_WIDE_INT set2;
+ alias_set_type set1;
+ alias_set_type set2;
if (VOID_TYPE_P (type1) || VOID_TYPE_P (type2))
return false;
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 0f3351e563c..b1dcf44f803 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -171,7 +171,7 @@ struct alias_map_d
{
/* Variable and its alias set. */
tree var;
- HOST_WIDE_INT set;
+ alias_set_type set;
};
@@ -198,7 +198,7 @@ static bitmap_obstack alias_bitmap_obstack;
static void compute_flow_insensitive_aliasing (struct alias_info *);
static void finalize_ref_all_pointers (struct alias_info *);
static void dump_alias_stats (FILE *);
-static bool may_alias_p (tree, HOST_WIDE_INT, tree, HOST_WIDE_INT, bool);
+static bool may_alias_p (tree, alias_set_type, tree, alias_set_type, bool);
static tree create_memory_tag (tree type, bool is_type_tag);
static tree get_smt_for (tree, struct alias_info *);
static tree get_nmt_for (tree);
@@ -2669,8 +2669,8 @@ maybe_create_global_var (void)
VAR_ALIAS_SET is the alias set for VAR. */
static bool
-may_alias_p (tree ptr, HOST_WIDE_INT mem_alias_set,
- tree var, HOST_WIDE_INT var_alias_set,
+may_alias_p (tree ptr, alias_set_type mem_alias_set,
+ tree var, alias_set_type var_alias_set,
bool alias_set_only)
{
tree mem;
@@ -2998,7 +2998,7 @@ get_smt_for (tree ptr, struct alias_info *ai)
size_t i;
tree tag;
tree tag_type = TREE_TYPE (TREE_TYPE (ptr));
- HOST_WIDE_INT tag_set = get_alias_set (tag_type);
+ alias_set_type tag_set = get_alias_set (tag_type);
/* We use a unique memory tag for all the ref-all pointers. */
if (PTR_IS_REF_ALL (ptr))
@@ -3644,7 +3644,7 @@ get_or_create_used_part_for (size_t uid)
static tree
create_sft (tree var, tree field, unsigned HOST_WIDE_INT offset,
- unsigned HOST_WIDE_INT size, HOST_WIDE_INT alias_set)
+ unsigned HOST_WIDE_INT size, alias_set_type alias_set)
{
tree subvar = create_tag_raw (STRUCT_FIELD_TAG, field, "SFT");
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index b8da5a3295b..069c876e265 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -4343,12 +4343,12 @@ set_uids_in_ptset (tree ptr, bitmap into, bitmap from, bool is_derefed,
unsigned int i;
bitmap_iterator bi;
subvar_t sv;
- HOST_WIDE_INT ptr_alias_set = get_alias_set (TREE_TYPE (ptr));
+ alias_set_type ptr_alias_set = get_alias_set (TREE_TYPE (ptr));
EXECUTE_IF_SET_IN_BITMAP (from, 0, i, bi)
{
varinfo_t vi = get_varinfo (i);
- unsigned HOST_WIDE_INT var_alias_set;
+ alias_set_type var_alias_set;
/* The only artificial variables that are allowed in a may-alias
set are heap variables. */
@@ -4477,7 +4477,7 @@ merge_smts_into (tree p, bitmap solution)
smt = var_ann (var)->symbol_mem_tag;
if (smt)
{
- HOST_WIDE_INT smtset = get_alias_set (TREE_TYPE (smt));
+ alias_set_type smtset = get_alias_set (TREE_TYPE (smt));
/* Need to set the SMT subsets first before this
will work properly. */
diff --git a/gcc/tree.h b/gcc/tree.h
index 808897b7d70..6f6c53564b4 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "statistics.h"
#include "vec.h"
#include "double-int.h"
+#include "alias.h"
/* Codes of tree nodes */
@@ -2322,7 +2323,7 @@ struct tree_type GTY(())
tree binfo;
tree context;
tree canonical;
- HOST_WIDE_INT alias_set;
+ alias_set_type alias_set;
/* Points to a structure whose details depend on the language in use. */
struct lang_type *lang_specific;
};
@@ -2562,7 +2563,7 @@ struct tree_struct_field_tag GTY(())
unsigned HOST_WIDE_INT size;
/* Alias set for a DECL_NONADDRESSABLE_P field. Otherwise -1. */
- HOST_WIDE_INT alias_set;
+ alias_set_type alias_set;
};
#define SFT_PARENT_VAR(NODE) (STRUCT_FIELD_TAG_CHECK (NODE)->sft.parent_var)
#define SFT_OFFSET(NODE) (STRUCT_FIELD_TAG_CHECK (NODE)->sft.offset)
@@ -2785,7 +2786,7 @@ struct tree_decl_common GTY(())
tree attributes;
tree abstract_origin;
- HOST_WIDE_INT pointer_alias_set;
+ alias_set_type pointer_alias_set;
/* Points to a structure whose details depend on the language in use. */
struct lang_decl *lang_specific;
};
@@ -4780,9 +4781,9 @@ extern tree strip_float_extensions (tree);
/* In alias.c */
extern void record_component_aliases (tree);
-extern HOST_WIDE_INT get_alias_set (tree);
-extern int alias_sets_conflict_p (HOST_WIDE_INT, HOST_WIDE_INT);
-extern int alias_sets_must_conflict_p (HOST_WIDE_INT, HOST_WIDE_INT);
+extern alias_set_type get_alias_set (tree);
+extern int alias_sets_conflict_p (alias_set_type, alias_set_type);
+extern int alias_sets_must_conflict_p (alias_set_type, alias_set_type);
extern int objects_must_conflict_p (tree, tree);
/* In tree.c */
diff --git a/gcc/varasm.c b/gcc/varasm.c
index b2b68cd96a9..2ec4f2b876a 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -107,7 +107,7 @@ bool first_function_block_is_cold;
/* We give all constants their own alias set. Perhaps redundant with
MEM_READONLY_P, but pre-dates it. */
-static HOST_WIDE_INT const_alias_set;
+static alias_set_type const_alias_set;
static const char *strip_reg_name (const char *);
static int contains_pointers_p (tree);