aboutsummaryrefslogtreecommitdiff
path: root/gcc/dse.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-08-11 17:21:56 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2007-08-11 17:21:56 +0000
commit4862826d55a2cdc42cfa3093b90349fc234dee6c (patch)
treed0f0bb94d35f0f3656fa880c6a29ffe6bde7aa38 /gcc/dse.c
parenta7f051fe0bc3638c7f289b8d34e022cbb7f8228d (diff)
downloadgcc-4862826d55a2cdc42cfa3093b90349fc234dee6c.zip
gcc-4862826d55a2cdc42cfa3093b90349fc234dee6c.tar.gz
gcc-4862826d55a2cdc42cfa3093b90349fc234dee6c.tar.bz2
alias.h (alias_set_type): Define new type.
./: * 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. From-SVN: r127362
Diffstat (limited to 'gcc/dse.c')
-rw-r--r--gcc/dse.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/dse.c b/gcc/dse.c
index e006f07..f8859f6 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;