tree-sra.c (generate_element_init_1): Deal with NULL constructor element index.
2008-08-18 Richard Guenther <rguenther@suse.de> * tree-sra.c (generate_element_init_1): Deal with NULL constructor element index. (scalarize_init): If we failed to generate some initializers do not generate zeros for not instantiated members. Instead rely on the copy out. * tree-ssa-operands.c (get_addr_dereference_operands): Warn about missing flow-sensitive alias info only if we have aliases computed. From-SVN: r139188
This commit is contained in:
parent
46102bbfb9
commit
400196f17b
3 changed files with 26 additions and 6 deletions
|
@ -1,3 +1,14 @@
|
|||
2008-08-18 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* tree-sra.c (generate_element_init_1): Deal with NULL constructor
|
||||
element index.
|
||||
(scalarize_init): If we failed to generate some initializers
|
||||
do not generate zeros for not instantiated members. Instead
|
||||
rely on the copy out.
|
||||
* tree-ssa-operands.c (get_addr_dereference_operands): Warn
|
||||
about missing flow-sensitive alias info only if we have
|
||||
aliases computed.
|
||||
|
||||
2008-08-17 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* doc/extend.texi (Function Attributes): Fix typo in description
|
||||
|
|
|
@ -2779,6 +2779,12 @@ generate_element_init_1 (struct sra_elt *elt, tree init, gimple_seq *seq_p)
|
|||
case CONSTRUCTOR:
|
||||
FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (init), idx, purpose, value)
|
||||
{
|
||||
/* Array constructors are routinely created with NULL indices. */
|
||||
if (purpose == NULL_TREE)
|
||||
{
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
if (TREE_CODE (purpose) == RANGE_EXPR)
|
||||
{
|
||||
tree lower = TREE_OPERAND (purpose, 0);
|
||||
|
@ -3404,11 +3410,6 @@ scalarize_init (struct sra_elt *lhs_elt, tree rhs, gimple_stmt_iterator *gsi)
|
|||
result = generate_element_init (lhs_elt, rhs, &init_seq);
|
||||
}
|
||||
|
||||
/* CONSTRUCTOR is defined such that any member not mentioned is assigned
|
||||
a zero value. Initialize the rest of the instantiated elements. */
|
||||
generate_element_zero (lhs_elt, &seq);
|
||||
gimple_seq_add_seq (&seq, init_seq);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
/* If we failed to convert the entire initializer, then we must
|
||||
|
@ -3423,6 +3424,13 @@ scalarize_init (struct sra_elt *lhs_elt, tree rhs, gimple_stmt_iterator *gsi)
|
|||
gimple_seq_add_seq (&seq0, seq);
|
||||
seq = seq0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* CONSTRUCTOR is defined such that any member not mentioned is assigned
|
||||
a zero value. Initialize the rest of the instantiated elements. */
|
||||
generate_element_zero (lhs_elt, &seq);
|
||||
gimple_seq_add_seq (&seq, init_seq);
|
||||
}
|
||||
|
||||
if (lhs_elt->use_block_copy || !result)
|
||||
{
|
||||
|
|
|
@ -1504,7 +1504,8 @@ get_addr_dereference_operands (gimple stmt, tree *addr, int flags,
|
|||
&& TREE_CODE (ptr) == SSA_NAME
|
||||
&& (pi == NULL
|
||||
|| (pi->name_mem_tag == NULL_TREE
|
||||
&& !pi->pt_anything)))
|
||||
&& !pi->pt_anything))
|
||||
&& gimple_aliases_computed_p (cfun))
|
||||
{
|
||||
fprintf (dump_file,
|
||||
"NOTE: no flow-sensitive alias info for ");
|
||||
|
|
Loading…
Add table
Reference in a new issue