* tree-flow.h (may_be_nonaddressable_p): New definition. Make the
existing static function global.
*tree-ssa-loop-ivopts.c (may_be_nonaddressable_p): This function
is changed to global.
*tree-ssa-loop-prefetch.c (gather_memory_references_ref): Call
may_be_nonaddressable_p on base, and don't collect this reference
if the address of the base could not be taken.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163475
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-08-23 Changpeng Fang <changpeng.fang@amd.com>
+
+ * tree-flow.h (may_be_nonaddressable_p): New definition. Make the
+ existing static function global.
+
+ *tree-ssa-loop-ivopts.c (may_be_nonaddressable_p): This function
+ is changed to global.
+
+ *tree-ssa-loop-prefetch.c (gather_memory_references_ref): Call
+ may_be_nonaddressable_p on base, and don't collect this reference
+ if the address of the base could not be taken.
+
2010-08-23 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.opt (-mveclibabi=mass): New option to
bool multiplier_allowed_in_address_p (HOST_WIDE_INT, enum machine_mode,
addr_space_t);
unsigned multiply_by_cost (HOST_WIDE_INT, enum machine_mode, bool);
+bool may_be_nonaddressable_p (tree expr);
/* In tree-ssa-threadupdate.c. */
extern bool thread_through_all_blocks (bool);
/* Return true if EXPR may be non-addressable. */
-static bool
+bool
may_be_nonaddressable_p (tree expr)
{
switch (TREE_CODE (expr))
if (step == NULL_TREE)
return false;
+ /* Stop if the address of BASE could not taken. */
+ if (may_be_nonaddressable_p (base))
+ return false;
+
/* Limit non-constant step prefetching only to the innermost loops. */
if (!cst_and_fits_in_hwi (step) && loop->inner != NULL)
return false;