OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* tree-sra.c (sra_walk_expr): Don't maybe_lookup_element_for_expr
[pf3gnuchains/gcc-fork.git]
/
gcc
/
tree-sra.c
diff --git
a/gcc/tree-sra.c
b/gcc/tree-sra.c
index
022da7d
..
2642dfe
100644
(file)
--- a/
gcc/tree-sra.c
+++ b/
gcc/tree-sra.c
@@
-615,6
+615,7
@@
sra_walk_expr (tree *expr_p, block_stmt_iterator *bsi, bool is_output,
{
tree expr = *expr_p;
tree inner = expr;
{
tree expr = *expr_p;
tree inner = expr;
+ bool disable_scalarization = false;
/* We're looking to collect a reference expression between EXPR and INNER,
such that INNER is a scalarizable decl and all other nodes through EXPR
/* We're looking to collect a reference expression between EXPR and INNER,
such that INNER is a scalarizable decl and all other nodes through EXPR
@@
-632,7
+633,10
@@
sra_walk_expr (tree *expr_p, block_stmt_iterator *bsi, bool is_output,
if (is_sra_candidate_decl (inner))
{
struct sra_elt *elt = maybe_lookup_element_for_expr (expr);
if (is_sra_candidate_decl (inner))
{
struct sra_elt *elt = maybe_lookup_element_for_expr (expr);
- fns->use (elt, expr_p, bsi, is_output);
+ if (disable_scalarization)
+ elt->cannot_scalarize = true;
+ else
+ fns->use (elt, expr_p, bsi, is_output);
}
return;
}
return;
@@
-649,14
+653,8
@@
sra_walk_expr (tree *expr_p, block_stmt_iterator *bsi, bool is_output,
without duplicating too much code. */
if (!is_valid_const_index (inner))
{
without duplicating too much code. */
if (!is_valid_const_index (inner))
{
- if (fns->initial_scan)
- {
- struct sra_elt *elt
- = maybe_lookup_element_for_expr (TREE_OPERAND (inner, 0));
- if (elt)
- elt->cannot_scalarize = true;
- }
- return;
+ disable_scalarization = true;
+ goto use_all;
}
/* ??? Are we assured that non-constant bounds and stride will have
the same value everywhere? I don't think Fortran will... */
}
/* ??? Are we assured that non-constant bounds and stride will have
the same value everywhere? I don't think Fortran will... */