summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-09 23:04:06 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-09 23:04:06 +0000
commit0d7349754ea74c3a7eac8d0b457f86e703bdb031 (patch)
treee5a7ffd19651ec8e341a482d405d293a6e720838 /gcc/gimplify.c
parentc8e41bd91cde9c8c33f6d49f4e1d2e1be70d7d8b (diff)
downloadgcc-0d7349754ea74c3a7eac8d0b457f86e703bdb031.tar.gz
* tree-scalar-evolution.c (scev_const_prop): Add arguments to
force_gimple_operand_bsi. * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr, rewrite_use_compare): Ditto. * tree-ssa-address.c (gimplify_mem_ref_parts, create_mem_ref): Ditto. * tree-ssa-ifcombine.c (ifcombine_ifandif): Ditto. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Ditto. * lambda-code.c (replace_uses_equiv_to_x_with_y): Ditto. * tree-profile.c (prepare_instrumented_value, tree_gen_interval_profiler, tree_gen_pow2_profiler, tree_gen_one_value_profiler, tree_gen_ic_profiler, tree_gen_ic_func_profiler, tree_gen_average_profiler, tree_gen_ior_profiler): Ditto. * tree-ssa-reassoc.c (negate_value): Ditto. * matrix-reorg.c (transform_access_sites, transform_allocation_sites): Use force_gimple_operand_bsi. * tree-vect-transform.c (vect_update_ivs_after_vectorizer): Ditto. * tree-if-conv.c (add_to_dst_predicate_list, find_phi_replacement_condition): Ditto. * gimplify.c (force_gimple_operand_bsi): Add before and m arguments. Call mark_symbols_for_renaming for new statements. * tree-flow.h (force_gimple_operand_bsi): Declaration changed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126500 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index bc87f39aefb..3b5fa895238 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -6648,17 +6648,34 @@ force_gimple_operand (tree expr, tree *stmts, bool simple, tree var)
}
/* Invokes force_gimple_operand for EXPR with parameters SIMPLE_P and VAR. If
- some statements are produced, emits them before BSI. */
+ some statements are produced, emits them at BSI. If BEFORE is true.
+ the statements are appended before BSI, otherwise they are appended after
+ it. M specifies the way BSI moves after insertion (BSI_SAME_STMT or
+ BSI_CONTINUE_LINKING are the usual values). */
tree
force_gimple_operand_bsi (block_stmt_iterator *bsi, tree expr,
- bool simple_p, tree var)
+ bool simple_p, tree var, bool before,
+ enum bsi_iterator_update m)
{
tree stmts;
expr = force_gimple_operand (expr, &stmts, simple_p, var);
if (stmts)
- bsi_insert_before (bsi, stmts, BSI_SAME_STMT);
+ {
+ if (gimple_in_ssa_p (cfun))
+ {
+ tree_stmt_iterator tsi;
+
+ for (tsi = tsi_start (stmts); !tsi_end_p (tsi); tsi_next (&tsi))
+ mark_symbols_for_renaming (tsi_stmt (tsi));
+ }
+
+ if (before)
+ bsi_insert_before (bsi, stmts, m);
+ else
+ bsi_insert_after (bsi, stmts, m);
+ }
return expr;
}