diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-11-08 18:33:42 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-11-08 18:33:42 +0000 |
commit | ee45a32dae253f7daa966573eb8cb64b2cf7bf52 (patch) | |
tree | cf927ff52a6d5ba28290472db09363fe67a835d6 /gcc/tree-ssa-loop-ivopts.c | |
parent | eb11eb157cf07500e2915da8a72f2f3a501cc5ae (diff) | |
download | gcc-ee45a32dae253f7daa966573eb8cb64b2cf7bf52.zip gcc-ee45a32dae253f7daa966573eb8cb64b2cf7bf52.tar.gz gcc-ee45a32dae253f7daa966573eb8cb64b2cf7bf52.tar.bz2 |
Merge of the scalar-storage-order branch.
From-SVN: r229965
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 1f952a7..5ae5e72 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -1983,10 +1983,27 @@ may_be_nonaddressable_p (tree expr) target, thus they are always addressable. */ return false; + case MEM_REF: + /* Likewise for MEM_REFs, modulo the storage order. */ + return REF_REVERSE_STORAGE_ORDER (expr); + + case BIT_FIELD_REF: + if (REF_REVERSE_STORAGE_ORDER (expr)) + return true; + return may_be_nonaddressable_p (TREE_OPERAND (expr, 0)); + case COMPONENT_REF: + if (TYPE_REVERSE_STORAGE_ORDER (TREE_TYPE (TREE_OPERAND (expr, 0)))) + return true; return DECL_NONADDRESSABLE_P (TREE_OPERAND (expr, 1)) || may_be_nonaddressable_p (TREE_OPERAND (expr, 0)); + case ARRAY_REF: + case ARRAY_RANGE_REF: + if (TYPE_REVERSE_STORAGE_ORDER (TREE_TYPE (TREE_OPERAND (expr, 0)))) + return true; + return may_be_nonaddressable_p (TREE_OPERAND (expr, 0)); + case VIEW_CONVERT_EXPR: /* This kind of view-conversions may wrap non-addressable objects and make them look addressable. After some processing the @@ -1995,11 +2012,6 @@ may_be_nonaddressable_p (tree expr) if (is_gimple_reg (TREE_OPERAND (expr, 0)) || !is_gimple_addressable (TREE_OPERAND (expr, 0))) return true; - - /* ... fall through ... */ - - case ARRAY_REF: - case ARRAY_RANGE_REF: return may_be_nonaddressable_p (TREE_OPERAND (expr, 0)); CASE_CONVERT: @@ -4306,13 +4318,14 @@ split_address_cost (struct ivopts_data *data, HOST_WIDE_INT bitpos; tree toffset; machine_mode mode; - int unsignedp, volatilep; + int unsignedp, reversep, volatilep; core = get_inner_reference (addr, &bitsize, &bitpos, &toffset, &mode, - &unsignedp, &volatilep, false); + &unsignedp, &reversep, &volatilep, false); if (toffset != 0 || bitpos % BITS_PER_UNIT != 0 + || reversep || TREE_CODE (core) != VAR_DECL) { *symbol_present = false; |