Commit 68b9f53b by Andrew MacLeod Committed by Andrew Macleod

tree-cfg.c (bsi_insert_before, [...]): Call modify_stmt after linking stmt into the program.


2004-08-10  Andrew MacLeod  <amacleod@redhat.com>

	* tree-cfg.c (bsi_insert_before, bsi_insert_after): Call modify_stmt
	after linking stmt into the program.
	(bsi_remove): Don't call modify_stmt.
	* tree-complex.c (update_complex_assignment,
	expand_complex_comparison): Call modify_stmt after changing the stmt.
	* tree-outof-ssa.c (rewrite_trees): Call modify_stmt only if not
	removing the stmt.
	* tree-ssa-ccp.c (substitute_and_fold): Call modify_stmt after changing
	the stmt, and only if needed.
	* tree-ssa-dom.c (thread_across_edge): Pass no annotation for a dummy
	expression.
	(simplify_rhs_and_lookup_avail_expr): Don't take an annotation param.
	(simplify_cond_and_lookup_avail_expr): Use modify_stmt.
	(simplify_switch_and_lookup_avail_expr): Don't take an annotation param.
	(eliminate_redundant_computations): Don't pass an annotation. Call
	modify_stmt rather than setting the annotation directly.
	(record_equivalences_from_stmt): Remove unused local 'j'.
	(cprop_operand): Take a stmt rather than an annotation as a parameter.
	Call modify_stmt.
	(cprop_into_stmt): Pass stmt rather than annotation.
	(update_rhs_and_lookup_avail_expr): Call modify_stmt.
	* tree-ssa-loop-im.c (schedule_sm): Call get_stmt_ann rather than
	modify_stmt.
	* tree-ssa.c (propagate_into_addr): Dont call modify_stmt.

From-SVN: r85765
parent 6c9c4526
2004-08-10 Andrew MacLeod <amacleod@redhat.com>
* tree-cfg.c (bsi_insert_before, bsi_insert_after): Call modify_stmt
after linking stmt into the program.
(bsi_remove): Don't call modify_stmt.
* tree-complex.c (update_complex_assignment,
expand_complex_comparison): Call modify_stmt after changing the stmt.
* tree-outof-ssa.c (rewrite_trees): Call modify_stmt only if not
removing the stmt.
* tree-ssa-ccp.c (substitute_and_fold): Call modify_stmt after changing
the stmt, and only if needed.
* tree-ssa-dom.c (thread_across_edge): Pass no annotation for a dummy
expression.
(simplify_rhs_and_lookup_avail_expr): Don't take an annotation param.
(simplify_cond_and_lookup_avail_expr): Use modify_stmt.
(simplify_switch_and_lookup_avail_expr): Don't take an annotation param.
(eliminate_redundant_computations): Don't pass an annotation. Call
modify_stmt rather than setting the annotation directly.
(record_equivalences_from_stmt): Remove unused local 'j'.
(cprop_operand): Take a stmt rather than an annotation as a parameter.
Call modify_stmt.
(cprop_into_stmt): Pass stmt rather than annotation.
(update_rhs_and_lookup_avail_expr): Call modify_stmt.
* tree-ssa-loop-im.c (schedule_sm): Call get_stmt_ann rather than
modify_stmt.
* tree-ssa.c (propagate_into_addr): Dont call modify_stmt.
2004-08-10 Jason Merrill <jason@redhat.com> 2004-08-10 Jason Merrill <jason@redhat.com>
PR middle-end/16948 PR middle-end/16948
......
...@@ -2814,8 +2814,8 @@ void ...@@ -2814,8 +2814,8 @@ void
bsi_insert_before (block_stmt_iterator *i, tree t, enum bsi_iterator_update m) bsi_insert_before (block_stmt_iterator *i, tree t, enum bsi_iterator_update m)
{ {
set_bb_for_stmt (t, i->bb); set_bb_for_stmt (t, i->bb);
modify_stmt (t);
tsi_link_before (&i->tsi, t, m); tsi_link_before (&i->tsi, t, m);
modify_stmt (t);
} }
...@@ -2827,8 +2827,8 @@ void ...@@ -2827,8 +2827,8 @@ void
bsi_insert_after (block_stmt_iterator *i, tree t, enum bsi_iterator_update m) bsi_insert_after (block_stmt_iterator *i, tree t, enum bsi_iterator_update m)
{ {
set_bb_for_stmt (t, i->bb); set_bb_for_stmt (t, i->bb);
modify_stmt (t);
tsi_link_after (&i->tsi, t, m); tsi_link_after (&i->tsi, t, m);
modify_stmt (t);
} }
...@@ -2840,7 +2840,6 @@ bsi_remove (block_stmt_iterator *i) ...@@ -2840,7 +2840,6 @@ bsi_remove (block_stmt_iterator *i)
{ {
tree t = bsi_stmt (*i); tree t = bsi_stmt (*i);
set_bb_for_stmt (t, NULL); set_bb_for_stmt (t, NULL);
modify_stmt (t);
tsi_delink (&i->tsi); tsi_delink (&i->tsi);
} }
......
...@@ -78,12 +78,12 @@ update_complex_assignment (block_stmt_iterator *bsi, tree r, tree i) ...@@ -78,12 +78,12 @@ update_complex_assignment (block_stmt_iterator *bsi, tree r, tree i)
tree stmt = bsi_stmt (*bsi); tree stmt = bsi_stmt (*bsi);
tree type; tree type;
modify_stmt (stmt);
if (TREE_CODE (stmt) == RETURN_EXPR) if (TREE_CODE (stmt) == RETURN_EXPR)
stmt = TREE_OPERAND (stmt, 0); stmt = TREE_OPERAND (stmt, 0);
type = TREE_TYPE (TREE_OPERAND (stmt, 1)); type = TREE_TYPE (TREE_OPERAND (stmt, 1));
TREE_OPERAND (stmt, 1) = build (COMPLEX_EXPR, type, r, i); TREE_OPERAND (stmt, 1) = build (COMPLEX_EXPR, type, r, i);
modify_stmt (stmt);
} }
/* Expand complex addition to scalars: /* Expand complex addition to scalars:
...@@ -326,7 +326,7 @@ static void ...@@ -326,7 +326,7 @@ static void
expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai, expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai,
tree br, tree bi, enum tree_code code) tree br, tree bi, enum tree_code code)
{ {
tree cr, ci, cc, stmt, type; tree cr, ci, cc, stmt, expr, type;
cr = gimplify_build2 (bsi, code, boolean_type_node, ar, br); cr = gimplify_build2 (bsi, code, boolean_type_node, ar, br);
ci = gimplify_build2 (bsi, code, boolean_type_node, ai, bi); ci = gimplify_build2 (bsi, code, boolean_type_node, ai, bi);
...@@ -334,17 +334,16 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai, ...@@ -334,17 +334,16 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai,
(code == EQ_EXPR ? TRUTH_AND_EXPR : TRUTH_OR_EXPR), (code == EQ_EXPR ? TRUTH_AND_EXPR : TRUTH_OR_EXPR),
boolean_type_node, cr, ci); boolean_type_node, cr, ci);
stmt = bsi_stmt (*bsi); stmt = expr = bsi_stmt (*bsi);
modify_stmt (stmt);
switch (TREE_CODE (stmt)) switch (TREE_CODE (stmt))
{ {
case RETURN_EXPR: case RETURN_EXPR:
stmt = TREE_OPERAND (stmt, 0); expr = TREE_OPERAND (stmt, 0);
/* FALLTHRU */ /* FALLTHRU */
case MODIFY_EXPR: case MODIFY_EXPR:
type = TREE_TYPE (TREE_OPERAND (stmt, 1)); type = TREE_TYPE (TREE_OPERAND (expr, 1));
TREE_OPERAND (stmt, 1) = fold_convert (type, cc); TREE_OPERAND (expr, 1) = fold_convert (type, cc);
break; break;
case COND_EXPR: case COND_EXPR:
TREE_OPERAND (stmt, 0) = cc; TREE_OPERAND (stmt, 0) = cc;
...@@ -352,6 +351,8 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai, ...@@ -352,6 +351,8 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai,
default: default:
abort (); abort ();
} }
modify_stmt (stmt);
} }
/* Process one statement. If we identify a complex operation, expand it. */ /* Process one statement. If we identify a complex operation, expand it. */
......
...@@ -1935,7 +1935,7 @@ rewrite_trees (var_map map, tree *values) ...@@ -1935,7 +1935,7 @@ rewrite_trees (var_map map, tree *values)
&& (DEF_FROM_PTR (def_p) == USE_OP (uses, 0))) && (DEF_FROM_PTR (def_p) == USE_OP (uses, 0)))
remove = 1; remove = 1;
} }
if (changed) if (changed & !remove)
modify_stmt (stmt); modify_stmt (stmt);
} }
......
...@@ -427,7 +427,6 @@ substitute_and_fold (void) ...@@ -427,7 +427,6 @@ substitute_and_fold (void)
{ {
bool changed = fold_stmt (bsi_stmt_ptr (i)); bool changed = fold_stmt (bsi_stmt_ptr (i));
stmt = bsi_stmt(i); stmt = bsi_stmt(i);
modify_stmt (stmt);
/* If we folded a builtin function, we'll likely /* If we folded a builtin function, we'll likely
need to rename VDEFs. */ need to rename VDEFs. */
if (replaced_address || changed) if (replaced_address || changed)
...@@ -436,6 +435,8 @@ substitute_and_fold (void) ...@@ -436,6 +435,8 @@ substitute_and_fold (void)
if (maybe_clean_eh_stmt (stmt)) if (maybe_clean_eh_stmt (stmt))
tree_purge_dead_eh_edges (bb); tree_purge_dead_eh_edges (bb);
} }
else
modify_stmt (stmt);
} }
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
......
...@@ -223,14 +223,12 @@ static void record_cond (tree, tree, varray_type *); ...@@ -223,14 +223,12 @@ static void record_cond (tree, tree, varray_type *);
static void record_dominating_conditions (tree, varray_type *); static void record_dominating_conditions (tree, varray_type *);
static void record_const_or_copy (tree, tree, varray_type *); static void record_const_or_copy (tree, tree, varray_type *);
static void record_equality (tree, tree, varray_type *); static void record_equality (tree, tree, varray_type *);
static tree update_rhs_and_lookup_avail_expr (tree, tree, varray_type *, static tree update_rhs_and_lookup_avail_expr (tree, tree, varray_type *, bool);
stmt_ann_t, bool);
static tree simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *, static tree simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *,
tree, stmt_ann_t, int); tree, int);
static tree simplify_cond_and_lookup_avail_expr (tree, varray_type *, static tree simplify_cond_and_lookup_avail_expr (tree, varray_type *,
stmt_ann_t, int); stmt_ann_t, int);
static tree simplify_switch_and_lookup_avail_expr (tree, varray_type *, static tree simplify_switch_and_lookup_avail_expr (tree, varray_type *, int);
stmt_ann_t, int);
static tree find_equivalent_equality_comparison (tree); static tree find_equivalent_equality_comparison (tree);
static void record_range (tree, basic_block, varray_type *); static void record_range (tree, basic_block, varray_type *);
static bool extract_range_from_cond (tree, tree *, tree *, int *); static bool extract_range_from_cond (tree, tree *, tree *, int *);
...@@ -652,10 +650,9 @@ thread_across_edge (struct dom_walk_data *walk_data, edge e) ...@@ -652,10 +650,9 @@ thread_across_edge (struct dom_walk_data *walk_data, edge e)
cached_lhs = lookup_avail_expr (dummy_cond, NULL, false); cached_lhs = lookup_avail_expr (dummy_cond, NULL, false);
if (!cached_lhs || ! is_gimple_min_invariant (cached_lhs)) if (!cached_lhs || ! is_gimple_min_invariant (cached_lhs))
{ {
stmt_ann_t ann = get_stmt_ann (dummy_cond);
cached_lhs = simplify_cond_and_lookup_avail_expr (dummy_cond, cached_lhs = simplify_cond_and_lookup_avail_expr (dummy_cond,
NULL, NULL,
ann, NULL,
false); false);
} }
} }
...@@ -1628,9 +1625,7 @@ record_equality (tree x, tree y, varray_type *block_const_and_copies_p) ...@@ -1628,9 +1625,7 @@ record_equality (tree x, tree y, varray_type *block_const_and_copies_p)
static tree static tree
simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data, simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data,
tree stmt, tree stmt, int insert)
stmt_ann_t ann,
int insert)
{ {
tree rhs = TREE_OPERAND (stmt, 1); tree rhs = TREE_OPERAND (stmt, 1);
enum tree_code rhs_code = TREE_CODE (rhs); enum tree_code rhs_code = TREE_CODE (rhs);
...@@ -1663,7 +1658,6 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data, ...@@ -1663,7 +1658,6 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data,
result = update_rhs_and_lookup_avail_expr (stmt, result = update_rhs_and_lookup_avail_expr (stmt,
rhs_def_operand, rhs_def_operand,
&bd->avail_exprs, &bd->avail_exprs,
ann,
insert); insert);
} }
} }
...@@ -1748,7 +1742,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data, ...@@ -1748,7 +1742,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data,
&& TREE_CODE (TREE_OPERAND (t, 0)) == SSA_NAME && TREE_CODE (TREE_OPERAND (t, 0)) == SSA_NAME
&& is_gimple_val (TREE_OPERAND (t, 1)))) && is_gimple_val (TREE_OPERAND (t, 1))))
result = update_rhs_and_lookup_avail_expr result = update_rhs_and_lookup_avail_expr
(stmt, t, &bd->avail_exprs, ann, insert); (stmt, t, &bd->avail_exprs, insert);
} }
} }
} }
...@@ -1808,8 +1802,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data, ...@@ -1808,8 +1802,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data,
op1, integer_one_node))); op1, integer_one_node)));
result = update_rhs_and_lookup_avail_expr (stmt, t, result = update_rhs_and_lookup_avail_expr (stmt, t,
&bd->avail_exprs, &bd->avail_exprs, insert);
ann, insert);
} }
} }
...@@ -1880,8 +1873,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data, ...@@ -1880,8 +1873,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data,
t = op; t = op;
result = update_rhs_and_lookup_avail_expr (stmt, t, result = update_rhs_and_lookup_avail_expr (stmt, t,
&bd->avail_exprs, &bd->avail_exprs, insert);
ann, insert);
} }
} }
...@@ -1893,8 +1885,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data, ...@@ -1893,8 +1885,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data,
if (t) if (t)
result = update_rhs_and_lookup_avail_expr (stmt, t, result = update_rhs_and_lookup_avail_expr (stmt, t,
&bd->avail_exprs, &bd->avail_exprs, insert);
ann, insert);
} }
return result; return result;
...@@ -2001,7 +1992,11 @@ simplify_cond_and_lookup_avail_expr (tree stmt, ...@@ -2001,7 +1992,11 @@ simplify_cond_and_lookup_avail_expr (tree stmt,
/* Update the statement to use the new equivalent /* Update the statement to use the new equivalent
condition. */ condition. */
COND_EXPR_COND (stmt) = new_cond; COND_EXPR_COND (stmt) = new_cond;
ann->modified = 1;
/* If this is not a real stmt, ann will be NULL and we
avoid processing the operands. */
if (ann)
modify_stmt (stmt);
/* Lookup the condition and return its known value if it /* Lookup the condition and return its known value if it
exists. */ exists. */
...@@ -2197,7 +2192,6 @@ simplify_cond_and_lookup_avail_expr (tree stmt, ...@@ -2197,7 +2192,6 @@ simplify_cond_and_lookup_avail_expr (tree stmt,
static tree static tree
simplify_switch_and_lookup_avail_expr (tree stmt, simplify_switch_and_lookup_avail_expr (tree stmt,
varray_type *block_avail_exprs_p, varray_type *block_avail_exprs_p,
stmt_ann_t ann,
int insert) int insert)
{ {
tree cond = SWITCH_COND (stmt); tree cond = SWITCH_COND (stmt);
...@@ -2243,7 +2237,7 @@ simplify_switch_and_lookup_avail_expr (tree stmt, ...@@ -2243,7 +2237,7 @@ simplify_switch_and_lookup_avail_expr (tree stmt,
if (!fail) if (!fail)
{ {
SWITCH_COND (stmt) = def; SWITCH_COND (stmt) = def;
ann->modified = 1; modify_stmt (stmt);
return lookup_avail_expr (stmt, block_avail_exprs_p, insert); return lookup_avail_expr (stmt, block_avail_exprs_p, insert);
} }
...@@ -2404,7 +2398,6 @@ eliminate_redundant_computations (struct dom_walk_data *walk_data, ...@@ -2404,7 +2398,6 @@ eliminate_redundant_computations (struct dom_walk_data *walk_data,
if (! cached_lhs && TREE_CODE (stmt) == MODIFY_EXPR) if (! cached_lhs && TREE_CODE (stmt) == MODIFY_EXPR)
cached_lhs = simplify_rhs_and_lookup_avail_expr (walk_data, cached_lhs = simplify_rhs_and_lookup_avail_expr (walk_data,
stmt, stmt,
ann,
insert); insert);
/* Similarly if this is a COND_EXPR and we did not find its /* Similarly if this is a COND_EXPR and we did not find its
expression in the hash table, simplify the condition and expression in the hash table, simplify the condition and
...@@ -2418,7 +2411,6 @@ eliminate_redundant_computations (struct dom_walk_data *walk_data, ...@@ -2418,7 +2411,6 @@ eliminate_redundant_computations (struct dom_walk_data *walk_data,
else if (!cached_lhs && TREE_CODE (stmt) == SWITCH_EXPR) else if (!cached_lhs && TREE_CODE (stmt) == SWITCH_EXPR)
cached_lhs = simplify_switch_and_lookup_avail_expr (stmt, cached_lhs = simplify_switch_and_lookup_avail_expr (stmt,
&bd->avail_exprs, &bd->avail_exprs,
ann,
insert); insert);
opt_stats.num_exprs_considered++; opt_stats.num_exprs_considered++;
...@@ -2465,7 +2457,7 @@ eliminate_redundant_computations (struct dom_walk_data *walk_data, ...@@ -2465,7 +2457,7 @@ eliminate_redundant_computations (struct dom_walk_data *walk_data,
retval = true; retval = true;
propagate_tree_value (expr_p, cached_lhs); propagate_tree_value (expr_p, cached_lhs);
ann->modified = 1; modify_stmt (stmt);
} }
return retval; return retval;
} }
...@@ -2642,7 +2634,7 @@ record_equivalences_from_stmt (tree stmt, ...@@ -2642,7 +2634,7 @@ record_equivalences_from_stmt (tree stmt,
CONST_AND_COPIES. */ CONST_AND_COPIES. */
static bool static bool
cprop_operand (stmt_ann_t ann, use_operand_p op_p, varray_type const_and_copies) cprop_operand (tree stmt, use_operand_p op_p, varray_type const_and_copies)
{ {
bool may_have_exposed_new_symbols = false; bool may_have_exposed_new_symbols = false;
tree val; tree val;
...@@ -2721,7 +2713,7 @@ cprop_operand (stmt_ann_t ann, use_operand_p op_p, varray_type const_and_copies) ...@@ -2721,7 +2713,7 @@ cprop_operand (stmt_ann_t ann, use_operand_p op_p, varray_type const_and_copies)
/* And note that we modified this statement. This is now /* And note that we modified this statement. This is now
safe, even if we changed virtual operands since we will safe, even if we changed virtual operands since we will
rescan the statement and rewrite its operands again. */ rescan the statement and rewrite its operands again. */
ann->modified = 1; modify_stmt (stmt);
} }
return may_have_exposed_new_symbols; return may_have_exposed_new_symbols;
} }
...@@ -2749,7 +2741,7 @@ cprop_into_stmt (tree stmt, varray_type const_and_copies) ...@@ -2749,7 +2741,7 @@ cprop_into_stmt (tree stmt, varray_type const_and_copies)
use_operand_p op_p = USE_OP_PTR (uses, i); use_operand_p op_p = USE_OP_PTR (uses, i);
if (TREE_CODE (USE_FROM_PTR (op_p)) == SSA_NAME) if (TREE_CODE (USE_FROM_PTR (op_p)) == SSA_NAME)
may_have_exposed_new_symbols may_have_exposed_new_symbols
|= cprop_operand (ann, op_p, const_and_copies); |= cprop_operand (stmt, op_p, const_and_copies);
} }
vuses = VUSE_OPS (ann); vuses = VUSE_OPS (ann);
...@@ -2759,7 +2751,7 @@ cprop_into_stmt (tree stmt, varray_type const_and_copies) ...@@ -2759,7 +2751,7 @@ cprop_into_stmt (tree stmt, varray_type const_and_copies)
use_operand_p op_p = VUSE_OP_PTR (vuses, i); use_operand_p op_p = VUSE_OP_PTR (vuses, i);
if (TREE_CODE (USE_FROM_PTR (op_p)) == SSA_NAME) if (TREE_CODE (USE_FROM_PTR (op_p)) == SSA_NAME)
may_have_exposed_new_symbols may_have_exposed_new_symbols
|= cprop_operand (ann, op_p, const_and_copies); |= cprop_operand (stmt, op_p, const_and_copies);
} }
v_may_defs = V_MAY_DEF_OPS (ann); v_may_defs = V_MAY_DEF_OPS (ann);
...@@ -2769,7 +2761,7 @@ cprop_into_stmt (tree stmt, varray_type const_and_copies) ...@@ -2769,7 +2761,7 @@ cprop_into_stmt (tree stmt, varray_type const_and_copies)
use_operand_p op_p = V_MAY_DEF_OP_PTR (v_may_defs, i); use_operand_p op_p = V_MAY_DEF_OP_PTR (v_may_defs, i);
if (TREE_CODE (USE_FROM_PTR (op_p)) == SSA_NAME) if (TREE_CODE (USE_FROM_PTR (op_p)) == SSA_NAME)
may_have_exposed_new_symbols may_have_exposed_new_symbols
|= cprop_operand (ann, op_p, const_and_copies); |= cprop_operand (stmt, op_p, const_and_copies);
} }
return may_have_exposed_new_symbols; return may_have_exposed_new_symbols;
} }
...@@ -2936,7 +2928,6 @@ optimize_stmt (struct dom_walk_data *walk_data, basic_block bb, ...@@ -2936,7 +2928,6 @@ optimize_stmt (struct dom_walk_data *walk_data, basic_block bb,
static tree static tree
update_rhs_and_lookup_avail_expr (tree stmt, tree new_rhs, update_rhs_and_lookup_avail_expr (tree stmt, tree new_rhs,
varray_type *block_avail_exprs_p, varray_type *block_avail_exprs_p,
stmt_ann_t ann,
bool insert) bool insert)
{ {
tree cached_lhs = NULL; tree cached_lhs = NULL;
...@@ -2982,7 +2973,7 @@ update_rhs_and_lookup_avail_expr (tree stmt, tree new_rhs, ...@@ -2982,7 +2973,7 @@ update_rhs_and_lookup_avail_expr (tree stmt, tree new_rhs,
/* And make sure we record the fact that we modified this /* And make sure we record the fact that we modified this
statement. */ statement. */
ann->modified = 1; modify_stmt (stmt);
return cached_lhs; return cached_lhs;
} }
......
...@@ -1007,8 +1007,7 @@ schedule_sm (struct loop *loop, edge *exits, unsigned n_exits, tree ref, ...@@ -1007,8 +1007,7 @@ schedule_sm (struct loop *loop, edge *exits, unsigned n_exits, tree ref,
/* Emit the load & stores. */ /* Emit the load & stores. */
load = build (MODIFY_EXPR, void_type_node, tmp_var, ref); load = build (MODIFY_EXPR, void_type_node, tmp_var, ref);
modify_stmt (load); get_stmt_ann (load)->common.aux = xcalloc (1, sizeof (struct lim_aux_data));
stmt_ann (load)->common.aux = xcalloc (1, sizeof (struct lim_aux_data));
LIM_DATA (load)->max_loop = loop; LIM_DATA (load)->max_loop = loop;
LIM_DATA (load)->tgt_loop = loop; LIM_DATA (load)->tgt_loop = loop;
......
...@@ -925,7 +925,6 @@ propagate_into_addr (tree stmt, tree var, tree *x, tree repl) ...@@ -925,7 +925,6 @@ propagate_into_addr (tree stmt, tree var, tree *x, tree repl)
|| TREE_OPERAND (*x, 0) != var) || TREE_OPERAND (*x, 0) != var)
return; return;
modify_stmt (stmt);
if (TREE_TYPE (*x) == TREE_TYPE (addr_var)) if (TREE_TYPE (*x) == TREE_TYPE (addr_var))
{ {
*x = addr_var; *x = addr_var;
...@@ -933,6 +932,7 @@ propagate_into_addr (tree stmt, tree var, tree *x, tree repl) ...@@ -933,6 +932,7 @@ propagate_into_addr (tree stmt, tree var, tree *x, tree repl)
return; return;
} }
/* Frontends sometimes produce expressions like *&a instead of a[0]. /* Frontends sometimes produce expressions like *&a instead of a[0].
Create a temporary variable to handle this case. */ Create a temporary variable to handle this case. */
ass_stmt = build2 (MODIFY_EXPR, void_type_node, NULL_TREE, repl); ass_stmt = build2 (MODIFY_EXPR, void_type_node, NULL_TREE, repl);
......
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