aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-affine.c
diff options
context:
space:
mode:
authorBin Cheng <bin.cheng@arm.com>2013-11-07 08:12:34 +0000
committerBin Cheng <amker@gcc.gnu.org>2013-11-07 08:12:34 +0000
commitbe8c1c8cc0ff3da71e4cfb553e27a2832f4a939d (patch)
treec0e359d6da2982c6ccbbe62856a6514b7b8eaf3f /gcc/tree-affine.c
parent196bb3237d1485b742e357be1c31771c5a0a35df (diff)
downloadgcc-be8c1c8cc0ff3da71e4cfb553e27a2832f4a939d.zip
gcc-be8c1c8cc0ff3da71e4cfb553e27a2832f4a939d.tar.gz
gcc-be8c1c8cc0ff3da71e4cfb553e27a2832f4a939d.tar.bz2
tree-ssa-loop-ivopts.c (alloc_iv): Lower address expressions.
* tree-ssa-loop-ivopts.c (alloc_iv): Lower address expressions. * tree-affine.c (get_inner_reference_aff): Return base. * tree-affine.h (get_inner_reference_aff): Change prototype. * gcc.dg/tree-ssa/loop-2.c: Refine check condition. * gcc.dg/tree-ssa/ivopt_infer_2.c: Ditto. * gcc.dg/tree-ssa/ivopt_mult_3.c: Ditto. From-SVN: r204497
Diffstat (limited to 'gcc/tree-affine.c')
-rw-r--r--gcc/tree-affine.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-affine.c b/gcc/tree-affine.c
index 81da521..b492ff0 100644
--- a/gcc/tree-affine.c
+++ b/gcc/tree-affine.c
@@ -874,10 +874,11 @@ debug_aff (aff_tree *val)
fprintf (stderr, "\n");
}
-/* Returns address of the reference REF in ADDR. The size of the accessed
- location is stored to SIZE. */
+/* Computes address of the reference REF in ADDR. The size of the accessed
+ location is stored to SIZE. Returns the ultimate containing object to
+ which REF refers. */
-void
+tree
get_inner_reference_aff (tree ref, aff_tree *addr, double_int *size)
{
HOST_WIDE_INT bitsize, bitpos;
@@ -904,6 +905,8 @@ get_inner_reference_aff (tree ref, aff_tree *addr, double_int *size)
aff_combination_add (addr, &tmp);
*size = double_int::from_shwi ((bitsize + BITS_PER_UNIT - 1) / BITS_PER_UNIT);
+
+ return base;
}
/* Returns true if a region of size SIZE1 at position 0 and a region of