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);
/* 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
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. */
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);
}
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;
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);
}