Commit eea05d39 by Eric Botcazou

tree-sra.c (sra_walk_expr): Disable scalarization if on the LHS and not a full access.

	* tree-sra.c (sra_walk_expr) <VIEW_CONVERT_EXPR>: Disable
	scalarization if on the LHS and not a full access.

From-SVN: r134487
parent e871a873
2008-04-20 Eric Botcazou <ebotcazou@adacore.com>
* tree-sra.c (sra_walk_expr) <VIEW_CONVERT_EXPR>: Disable
scalarization if on the LHS and not a full access.
2008-04-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2008-04-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in (s-gtyp-input): Remove tmp-gi.list before writing * Makefile.in (s-gtyp-input): Remove tmp-gi.list before writing it.
it.
2008-04-18 Rafael Espindola <espindola@google.com> 2008-04-18 Rafael Espindola <espindola@google.com>
* tree-vrp.c (find_case_label_index): Fix the binary search. * tree-vrp.c (find_case_label_index): Fix the binary search.
(find_case_label_range): New. (find_case_label_range): New.
(vrp_visit_switch_stmt): Use find_case_label_range. (vrp_visit_switch_stmt): Use find_case_label_range.
......
...@@ -855,18 +855,28 @@ sra_walk_expr (tree *expr_p, block_stmt_iterator *bsi, bool is_output, ...@@ -855,18 +855,28 @@ sra_walk_expr (tree *expr_p, block_stmt_iterator *bsi, bool is_output,
if (elt) if (elt)
elt->is_vector_lhs = true; elt->is_vector_lhs = true;
} }
/* A bit field reference (access to *multiple* fields simultaneously) /* A bit field reference (access to *multiple* fields simultaneously)
is not currently scalarized. Consider this an access to the is not currently scalarized. Consider this an access to the full
complete outer element, to which walk_tree will bring us next. */ outer element, to which walk_tree will bring us next. */
goto use_all; goto use_all;
case VIEW_CONVERT_EXPR:
case NOP_EXPR: case NOP_EXPR:
/* Similarly, a view/nop explicitly wants to look at an object in a /* Similarly, a nop explicitly wants to look at an object in a
type other than the one we've scalarized. */ type other than the one we've scalarized. */
goto use_all; goto use_all;
case VIEW_CONVERT_EXPR:
/* Likewise for a view conversion, but with an additional twist:
it can be on the LHS and, in this case, an access to the full
outer element would mean a killing def. So we need to punt
if we haven't already a full access to the current element,
because we cannot pretend to have a killing def if we only
have a partial access at some level. */
if (is_output && !use_all_p && inner != expr)
disable_scalarization = true;
goto use_all;
case WITH_SIZE_EXPR: case WITH_SIZE_EXPR:
/* This is a transparent wrapper. The entire inner expression really /* This is a transparent wrapper. The entire inner expression really
is being used. */ is being used. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment