aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-address.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernd.schmidt@analog.com>2006-11-15 14:29:10 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2006-11-15 14:29:10 +0000
commitdd5f63f83e862faee09a5a02bd417438a81ef8a1 (patch)
tree016447456ff77c72488cc81bf2d117b7bcf6d8af /gcc/tree-ssa-address.c
parentc78ba53a65fdd2586b93937e6a757e652149e37f (diff)
downloadgcc-dd5f63f83e862faee09a5a02bd417438a81ef8a1.zip
gcc-dd5f63f83e862faee09a5a02bd417438a81ef8a1.tar.gz
gcc-dd5f63f83e862faee09a5a02bd417438a81ef8a1.tar.bz2
tree-flow.h (multiplier_allowed_in_address_p): Adjust prototype.
* tree-flow.h (multiplier_allowed_in_address_p): Adjust prototype. * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): New arg MODE; all callers changed. Use it to determine validity per machine mode instead of using Pmode for all memory references. (get_address_cost): Likewise add and use new arg MEM_MODE. From-SVN: r118856
Diffstat (limited to 'gcc/tree-ssa-address.c')
-rw-r--r--gcc/tree-ssa-address.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index 9dbc399..c339449 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -397,8 +397,9 @@ most_expensive_mult_to_index (struct mem_address *parts, tree type,
for (i = 0; i < addr->n; i++)
{
+ /* FIXME: Should use the correct memory mode rather than Pmode. */
if (addr->coefs[i] == 1
- || !multiplier_allowed_in_address_p (addr->coefs[i]))
+ || !multiplier_allowed_in_address_p (addr->coefs[i], Pmode))
continue;
acost = multiply_by_cost (addr->coefs[i], Pmode);