mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-19 18:20:56 +08:00
alias.c (aliases_everything_p): Remove.
2012-06-11 Richard Guenther <rguenther@suse.de> * alias.c (aliases_everything_p): Remove. (DIFFERENT_ALIAS_SETS_P): Likewise. (true_dependence_1): Use mems_in_disjoint_alias_sets_p directly. Do not use aliases_everything_p or special-case ANDs. Do not special-case BLKmode moves. (may_alias_p): Likewise. Handle BLKmode similar like everywhere - for SCATCH only. From-SVN: r188384
This commit is contained in:
parent
f54ee9801d
commit
a95b3cc734
@ -1,3 +1,13 @@
|
||||
2012-06-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* alias.c (aliases_everything_p): Remove.
|
||||
(DIFFERENT_ALIAS_SETS_P): Likewise.
|
||||
(true_dependence_1): Use mems_in_disjoint_alias_sets_p directly.
|
||||
Do not use aliases_everything_p or special-case ANDs. Do not
|
||||
special-case BLKmode moves.
|
||||
(may_alias_p): Likewise. Handle BLKmode similar like everywhere
|
||||
- for SCATCH only.
|
||||
|
||||
2012-06-09 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
Fix CRIS build errors with --enable-build-with-cxx.
|
||||
|
53
gcc/alias.c
53
gcc/alias.c
@ -156,7 +156,6 @@ 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 alias_set_entry get_alias_set_entry (alias_set_type);
|
||||
static int aliases_everything_p (const_rtx);
|
||||
static bool nonoverlapping_component_refs_p (const_tree, const_tree);
|
||||
static tree decl_for_component_ref (tree);
|
||||
static int write_dependence_p (const_rtx, const_rtx, int);
|
||||
@ -168,13 +167,6 @@ static void memory_modified_1 (rtx, const_rtx, void *);
|
||||
/* Returns the size in bytes of the mode of X. */
|
||||
#define SIZE_FOR_MODE(X) (GET_MODE_SIZE (GET_MODE (X)))
|
||||
|
||||
/* Returns nonzero if MEM1 and MEM2 do not alias because they are in
|
||||
different alias sets. We ignore alias sets in functions making use
|
||||
of variable arguments because the va_arg macros on some systems are
|
||||
not legal ANSI C. */
|
||||
#define DIFFERENT_ALIAS_SETS_P(MEM1, MEM2) \
|
||||
mems_in_disjoint_alias_sets_p (MEM1, MEM2)
|
||||
|
||||
/* Cap the number of passes we make over the insns propagating alias
|
||||
information through set chains. 10 is a completely arbitrary choice. */
|
||||
#define MAX_ALIAS_LOOP_PASSES 10
|
||||
@ -2188,20 +2180,6 @@ read_dependence (const_rtx mem, const_rtx x)
|
||||
return MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem);
|
||||
}
|
||||
|
||||
/* Returns nonzero if something about the mode or address format MEM1
|
||||
indicates that it might well alias *anything*. */
|
||||
|
||||
static int
|
||||
aliases_everything_p (const_rtx mem)
|
||||
{
|
||||
if (GET_CODE (XEXP (mem, 0)) == AND)
|
||||
/* If the address is an AND, it's very hard to know at what it is
|
||||
actually pointing. */
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return true if we can determine that the fields referenced cannot
|
||||
overlap for any pair of objects. */
|
||||
|
||||
@ -2535,25 +2513,12 @@ true_dependence_1 (const_rtx mem, enum machine_mode mem_mode, rtx mem_addr,
|
||||
SIZE_FOR_MODE (x), x_addr, 0)) != -1)
|
||||
return ret;
|
||||
|
||||
if (DIFFERENT_ALIAS_SETS_P (x, mem))
|
||||
if (mems_in_disjoint_alias_sets_p (x, mem))
|
||||
return 0;
|
||||
|
||||
if (nonoverlapping_memrefs_p (mem, x, false))
|
||||
return 0;
|
||||
|
||||
if (aliases_everything_p (x))
|
||||
return 1;
|
||||
|
||||
/* We cannot use aliases_everything_p to test MEM, since we must look
|
||||
at MEM_ADDR, rather than XEXP (mem, 0). */
|
||||
if (GET_CODE (mem_addr) == AND)
|
||||
return 1;
|
||||
|
||||
/* ??? In true_dependence we also allow BLKmode to alias anything. Why
|
||||
don't we do this in anti_dependence and output_dependence? */
|
||||
if (mem_mode == BLKmode || GET_MODE (x) == BLKmode)
|
||||
return 1;
|
||||
|
||||
return rtx_refs_may_alias_p (x, mem, true);
|
||||
}
|
||||
|
||||
@ -2680,10 +2645,12 @@ may_alias_p (const_rtx mem, const_rtx x)
|
||||
if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem))
|
||||
return 1;
|
||||
|
||||
/* ??? In true_dependence we also allow BLKmode to alias anything. */
|
||||
if (GET_MODE (mem) == BLKmode || GET_MODE (x) == BLKmode)
|
||||
/* (mem:BLK (scratch)) is a special mechanism to conflict with everything.
|
||||
This is used in epilogue deallocation functions. */
|
||||
if (GET_MODE (x) == BLKmode && GET_CODE (XEXP (x, 0)) == SCRATCH)
|
||||
return 1;
|
||||
if (GET_MODE (mem) == BLKmode && GET_CODE (XEXP (mem, 0)) == SCRATCH)
|
||||
return 1;
|
||||
|
||||
if (MEM_ALIAS_SET (x) == ALIAS_SET_MEMORY_BARRIER
|
||||
|| MEM_ALIAS_SET (mem) == ALIAS_SET_MEMORY_BARRIER)
|
||||
return 1;
|
||||
@ -2722,14 +2689,6 @@ may_alias_p (const_rtx mem, const_rtx x)
|
||||
if (nonoverlapping_memrefs_p (mem, x, true))
|
||||
return 0;
|
||||
|
||||
if (aliases_everything_p (x))
|
||||
return 1;
|
||||
|
||||
/* We cannot use aliases_everything_p to test MEM, since we must look
|
||||
at MEM_ADDR, rather than XEXP (mem, 0). */
|
||||
if (GET_CODE (mem_addr) == AND)
|
||||
return 1;
|
||||
|
||||
/* TBAA not valid for loop_invarint */
|
||||
return rtx_refs_may_alias_p (x, mem, false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user