* 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
+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.
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 \
+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.
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);
\f
/* 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. */
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:
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);
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. */
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);
}
/* 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;
/* 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;
/* 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;
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
/* 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
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)
/* Return a brand-new alias set. */
-HOST_WIDE_INT
+alias_set_type
new_alias_set (void)
{
if (flag_strict_aliasing)
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;
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)
/* 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
/* 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)
#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 */
}
/* 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
{
/* 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))
{
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 "
/* 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;
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);
/* 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. */
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;
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)
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++)
\f
/* 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;
&& (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);
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);
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;
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)
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)
{
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. */
+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
/* 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))
/* 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);
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. */
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
/* 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;
};
/* 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;
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");
}
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;
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)
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
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);
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;
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)
{
}
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))
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;
if (dump_file)
fprintf (dump_file, " processing spill load %d\n",
- (int)spill_alias_set);
+ (int) spill_alias_set);
while (i_ptr)
{
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;
/* 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;
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 */
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 *);
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;
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);
/* 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. */
#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);
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);
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
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;
+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
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
/* 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;
tree lhs_base_decl;
/* The alias set of the lhs object. */
- int lhs_alias_set;
+ alias_set_type lhs_alias_set;
};
static 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);
/* 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;
/* 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
{
#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));
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)
{
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");
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,
/* 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);
}
#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. */
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. */
tree size;
tree decl;
HOST_WIDE_INT offset;
- HOST_WIDE_INT alias_set;
+ alias_set_type alias_set;
};
typedef struct fieldoff fieldoff_s;
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;
{
/* Variable and its alias set. */
tree var;
- HOST_WIDE_INT set;
+ alias_set_type set;
};
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);
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;
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))
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");
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. */
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. */
#include "statistics.h"
#include "vec.h"
#include "double-int.h"
+#include "alias.h"
/* Codes of tree nodes */
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;
};
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)
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;
};
/* 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 */
/* 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);