summaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-12 10:43:17 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-12 10:43:17 +0000
commit7f23b9c077526d41c0f29fb9f0515d86dcefc400 (patch)
treec4db522d46c717e3c63a6d84f7549bb941bf12d1 /gcc/tree-sra.c
parent6b48fd258456d6394a9e8e0e6890177ddbe8936a (diff)
downloadgcc-7f23b9c077526d41c0f29fb9f0515d86dcefc400.tar.gz
2012-03-12 Richard Guenther <rguenther@suse.de>
* tree-sra.c (create_access_replacement): Only rename the replacement if we can rewrite it into SSA form. Properly mark register typed replacements that we cannot rewrite with TREE_ADDRESSABLE. * tree-cfg.c (verify_expr): Fix BIT_FIELD_REF verification for aggregate or BLKmode results. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185221 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 710f24eeba6..65267a92f83 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1924,13 +1924,19 @@ create_access_replacement (struct access *access, bool rename)
repl = create_tmp_var (access->type, "SR");
add_referenced_var (repl);
- if (rename)
+ if (!access->grp_partial_lhs
+ && rename)
mark_sym_for_renaming (repl);
- if (!access->grp_partial_lhs
- && (TREE_CODE (access->type) == COMPLEX_TYPE
- || TREE_CODE (access->type) == VECTOR_TYPE))
- DECL_GIMPLE_REG_P (repl) = 1;
+ if (TREE_CODE (access->type) == COMPLEX_TYPE
+ || TREE_CODE (access->type) == VECTOR_TYPE)
+ {
+ if (!access->grp_partial_lhs)
+ DECL_GIMPLE_REG_P (repl) = 1;
+ }
+ else if (access->grp_partial_lhs
+ && is_gimple_reg_type (access->type))
+ TREE_ADDRESSABLE (repl) = 1;
DECL_SOURCE_LOCATION (repl) = DECL_SOURCE_LOCATION (access->base);
DECL_ARTIFICIAL (repl) = 1;