summaryrefslogtreecommitdiff
path: root/gcc/sese.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-29 12:37:05 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-29 12:37:05 +0000
commit12cb78d1cca1387a092ec0bd49c250340bff4afc (patch)
tree1eab97da96906e0a2786d51d9f25f20de02befcf /gcc/sese.c
parent31879e18aea3222fe3e56f2c0319c9f230645ff3 (diff)
downloadgcc-12cb78d1cca1387a092ec0bd49c250340bff4afc.tar.gz
2012-08-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 190745 using svnmerge, notably C++ conversion. [gcc/] 2012-08-29 Basile Starynkevitch <basile@starynkevitch.net> {{merging with trunk, converted to C++}} * melt-runtime.h (MELT_FLEXIBLE_DIM): Set when C++. * melt-runtime.c (melt_tempdir_path): Don't use choose_tmpdir from libiberty. (meltgc_start_module_by_index): Use address-of & on VEC_index. (melt_really_initialize): When printing builtin settings, handle GCC 4.8 as with implicit ENABLE_BUILD_WITH_CXX. (meltgc_out_edge): Provide additional flag TDF_DETAILS for dump_edge_info. (melt_val2passflag): Handle PROP_referenced_vars only when defined. * melt-module.mk: Use GCCMELT_COMPILER instead of GCCMELT_CC. * melt-build-script.tpl: Transmit GCCMELT_COMPILER on every make using melt-module.mk and improve the error message. * melt-build-script.sh: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@190778 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sese.c')
-rw-r--r--gcc/sese.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/gcc/sese.c b/gcc/sese.c
index 03b9f3d62aa..bfb797150ba 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -345,10 +345,8 @@ free_sese (sese region)
static void
sese_add_exit_phis_edge (basic_block exit, tree use, edge false_e, edge true_e)
{
- gimple phi = create_phi_node (use, exit);
-
- create_new_def_for (gimple_phi_result (phi), phi,
- gimple_phi_result_ptr (phi));
+ gimple phi = create_phi_node (NULL_TREE, exit);
+ create_new_def_for (use, phi, gimple_phi_result_ptr (phi));
add_phi_arg (phi, use, false_e, UNKNOWN_LOCATION);
add_phi_arg (phi, use, true_e, UNKNOWN_LOCATION);
}
@@ -482,14 +480,13 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt,
return false;
}
- FOR_EACH_SSA_USE_OPERAND (use_p, copy, op_iter, SSA_OP_ALL_USES)
+ FOR_EACH_SSA_USE_OPERAND (use_p, copy, op_iter, SSA_OP_USE)
{
tree old_name = USE_FROM_PTR (use_p);
tree new_expr, scev;
gimple_seq stmts;
if (TREE_CODE (old_name) != SSA_NAME
- || !is_gimple_reg (old_name)
|| SSA_NAME_IS_DEFAULT_DEF (old_name))
continue;
@@ -501,16 +498,14 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt,
tree type_new_expr = TREE_TYPE (new_expr);
if (type_old_name != type_new_expr
- || (TREE_CODE (new_expr) != SSA_NAME
- && is_gimple_reg (old_name)))
+ || TREE_CODE (new_expr) != SSA_NAME)
{
tree var = create_tmp_var (type_old_name, "var");
- if (type_old_name != type_new_expr)
+ if (!useless_type_conversion_p (type_old_name, type_new_expr))
new_expr = fold_convert (type_old_name, new_expr);
- new_expr = build2 (MODIFY_EXPR, type_old_name, var, new_expr);
- new_expr = force_gimple_operand (new_expr, &stmts, true, NULL);
+ new_expr = force_gimple_operand (new_expr, &stmts, true, var);
gsi_insert_seq_before (gsi_tgt, stmts, GSI_SAME_STMT);
}
@@ -604,7 +599,6 @@ graphite_copy_stmts_from_block (basic_block bb, basic_block new_bb,
operands. */
copy = gimple_copy (stmt);
gsi_insert_after (&gsi_tgt, copy, GSI_NEW_STMT);
- mark_sym_for_renaming (gimple_vop (cfun));
maybe_duplicate_eh_stmt (copy, stmt);
gimple_duplicate_stmt_histograms (cfun, copy, cfun, stmt);