Commit a5dbd798 by Richard Kenner

(iterator_loop_{pro,epi}logue): Set TREE_SIDE_EFFECTS on the MODIFY_EXPRs we make.

(iterator_loop_{pro,epi}logue): Set TREE_SIDE_EFFECTS on the MODIFY_EXPRs we
make.
Pass const0_rtx as TARGET to expand_expr.

From-SVN: r5032
parent c49f1ce8
...@@ -278,19 +278,22 @@ iterator_loop_prologue (idecl, start_note, end_note) ...@@ -278,19 +278,22 @@ iterator_loop_prologue (idecl, start_note, end_note)
tree idecl; tree idecl;
rtx *start_note, *end_note; rtx *start_note, *end_note;
{ {
tree expr;
/* Force the save_expr in DECL_INITIAL to be calculated /* Force the save_expr in DECL_INITIAL to be calculated
if it hasn't been calculated yet. */ if it hasn't been calculated yet. */
expand_expr (DECL_INITIAL (idecl), 0, VOIDmode, 0); expand_expr (DECL_INITIAL (idecl), const0_rtx, VOIDmode, 0);
if (DECL_RTL (idecl) == 0) if (DECL_RTL (idecl) == 0)
expand_decl (idecl); expand_decl (idecl);
if (start_note) if (start_note)
*start_note = emit_note (0, NOTE_INSN_DELETED); *start_note = emit_note (0, NOTE_INSN_DELETED);
/* Initialize counter. */ /* Initialize counter. */
expand_expr (build (MODIFY_EXPR, TREE_TYPE (idecl), expr = build (MODIFY_EXPR, TREE_TYPE (idecl), idecl, integer_zero_node);
idecl, integer_zero_node), TREE_SIDE_EFFECTS (expr) = 1;
0, VOIDmode, 0); expand_expr (expr, const0_rtx, VOIDmode, 0);
expand_start_loop_continue_elsewhere (1); expand_start_loop_continue_elsewhere (1);
...@@ -329,8 +332,9 @@ iterator_loop_epilogue (idecl, start_note, end_note) ...@@ -329,8 +332,9 @@ iterator_loop_epilogue (idecl, start_note, end_note)
*start_note = emit_note (0, NOTE_INSN_DELETED); *start_note = emit_note (0, NOTE_INSN_DELETED);
expand_loop_continue_here (); expand_loop_continue_here ();
incr = build_binary_op (PLUS_EXPR, idecl, integer_one_node, 0); incr = build_binary_op (PLUS_EXPR, idecl, integer_one_node, 0);
expand_expr (build (MODIFY_EXPR, TREE_TYPE (idecl), idecl, incr), incr = build (MODIFY_EXPR, TREE_TYPE (idecl), idecl, incr);
0, VOIDmode, 0); TREE_SIDE_EFFECTS (incr) = 1;
expand_expr (incr, const0_rtx, VOIDmode, 0);
test = build_binary_op (LT_EXPR, idecl, DECL_INITIAL (idecl), 0); test = build_binary_op (LT_EXPR, idecl, DECL_INITIAL (idecl), 0);
expand_exit_loop_if_false (0, test); expand_exit_loop_if_false (0, test);
expand_end_loop (); expand_end_loop ();
......
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