Commit 49385686 by Aditya Kumar Committed by Sebastian Pop

always print parameter names as P_{SSA_NAME_VERSION}

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r231085
parent db941d7e
2015-11-30 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>
* graphite-isl-ast-to-gimple.c: Fix dump messages.
* graphite-scop-detection.c: Same.
* graphite-sese-to-poly.c (isl_id_for_ssa_name): Do not call get_name.
2015-11-30 Cesar Philippidis <cesar@codesourcery.com> 2015-11-30 Cesar Philippidis <cesar@codesourcery.com>
* tree-nested.c (convert_nonlocal_omp_clauses): Add support for * tree-nested.c (convert_nonlocal_omp_clauses): Add support for
...@@ -2220,7 +2220,7 @@ translate_isl_ast_to_gimple::copy_loop_close_phi_args (basic_block old_bb, ...@@ -2220,7 +2220,7 @@ translate_isl_ast_to_gimple::copy_loop_close_phi_args (basic_block old_bb,
get_loc (old_name)); get_loc (old_name));
if (dump_file) if (dump_file)
{ {
fprintf (dump_file, "[codegen] Adding loop-closed phi: "); fprintf (dump_file, "[codegen] Adding loop close phi: ");
print_gimple_stmt (dump_file, new_close_phi, 0, 0); print_gimple_stmt (dump_file, new_close_phi, 0, 0);
} }
...@@ -2265,7 +2265,7 @@ translate_isl_ast_to_gimple::copy_loop_close_phi_nodes (basic_block old_bb, ...@@ -2265,7 +2265,7 @@ translate_isl_ast_to_gimple::copy_loop_close_phi_nodes (basic_block old_bb,
basic_block new_bb) basic_block new_bb)
{ {
if (dump_file) if (dump_file)
fprintf (dump_file, "[codegen] copying loop closed phi nodes in bb_%d.\n", fprintf (dump_file, "[codegen] copying loop close phi nodes in bb_%d.\n",
new_bb->index); new_bb->index);
/* Loop close phi nodes should have only one argument. */ /* Loop close phi nodes should have only one argument. */
gcc_assert (1 == EDGE_COUNT (old_bb->preds)); gcc_assert (1 == EDGE_COUNT (old_bb->preds));
......
...@@ -382,7 +382,7 @@ canonicalize_loop_closed_ssa (loop_p loop) ...@@ -382,7 +382,7 @@ canonicalize_loop_closed_ssa (loop_p loop)
if (single_pred_p (bb)) if (single_pred_p (bb))
{ {
e = split_block_after_labels (bb); e = split_block_after_labels (bb);
DEBUG_PRINT (dp << "\nSplitting bb_" << bb->index); DEBUG_PRINT (dp << "Splitting bb_" << bb->index << ".\n");
make_close_phi_nodes_unique (e->src); make_close_phi_nodes_unique (e->src);
} }
else else
...@@ -391,7 +391,7 @@ canonicalize_loop_closed_ssa (loop_p loop) ...@@ -391,7 +391,7 @@ canonicalize_loop_closed_ssa (loop_p loop)
basic_block close = split_edge (e); basic_block close = split_edge (e);
e = single_succ_edge (close); e = single_succ_edge (close);
DEBUG_PRINT (dp << "\nSplitting edge (" << e->src->index << "," DEBUG_PRINT (dp << "Splitting edge (" << e->src->index << ","
<< e->dest->index << ")\n"); << e->dest->index << ")\n");
for (psi = gsi_start_phis (bb); !gsi_end_p (psi); gsi_next (&psi)) for (psi = gsi_start_phis (bb); !gsi_end_p (psi); gsi_next (&psi))
...@@ -846,7 +846,7 @@ scop_detection::merge_sese (sese_l first, sese_l second) const ...@@ -846,7 +846,7 @@ scop_detection::merge_sese (sese_l first, sese_l second) const
combined.exit = single_succ_edge (imm_succ); combined.exit = single_succ_edge (imm_succ);
else else
{ {
DEBUG_PRINT (dp << "\n[scop-detection-fail] Discarding SCoP because " DEBUG_PRINT (dp << "[scop-detection-fail] Discarding SCoP because "
<< "no single exit (empty succ) for sese exit"; << "no single exit (empty succ) for sese exit";
print_sese (dump_file, combined)); print_sese (dump_file, combined));
return invalid_sese; return invalid_sese;
...@@ -870,7 +870,7 @@ scop_detection::build_scop_depth (sese_l s, loop_p loop) ...@@ -870,7 +870,7 @@ scop_detection::build_scop_depth (sese_l s, loop_p loop)
if (!loop) if (!loop)
return s; return s;
DEBUG_PRINT (dp << "\n[Depth loop_" << loop->num << "]"); DEBUG_PRINT (dp << "[Depth loop_" << loop->num << "]\n");
s = build_scop_depth (s, loop->inner); s = build_scop_depth (s, loop->inner);
sese_l s2 = merge_sese (s, get_sese (loop)); sese_l s2 = merge_sese (s, get_sese (loop));
...@@ -895,7 +895,7 @@ scop_detection::build_scop_breadth (sese_l s1, loop_p loop) ...@@ -895,7 +895,7 @@ scop_detection::build_scop_breadth (sese_l s1, loop_p loop)
{ {
if (!loop) if (!loop)
return s1; return s1;
DEBUG_PRINT (dp << "\n[Breadth loop_" << loop->num << "]"); DEBUG_PRINT (dp << "[Breadth loop_" << loop->num << "]\n");
gcc_assert (s1); gcc_assert (s1);
loop_p l = loop; loop_p l = loop;
...@@ -981,7 +981,7 @@ scop_detection::loop_is_valid_scop (loop_p loop, sese_l scop) const ...@@ -981,7 +981,7 @@ scop_detection::loop_is_valid_scop (loop_p loop, sese_l scop) const
if (loop_body_is_valid_scop (loop, scop)) if (loop_body_is_valid_scop (loop, scop))
{ {
DEBUG_PRINT (dp << "[valid-scop] loop_" << loop->num DEBUG_PRINT (dp << "[valid-scop] loop_" << loop->num
<< "is a valid scop.\n"); << " is a valid scop.\n");
return true; return true;
} }
return false; return false;
...@@ -1013,15 +1013,15 @@ scop_detection::add_scop (sese_l s) ...@@ -1013,15 +1013,15 @@ scop_detection::add_scop (sese_l s)
/* Do not add scops with only one loop. */ /* Do not add scops with only one loop. */
if (region_has_one_loop (s)) if (region_has_one_loop (s))
{ {
DEBUG_PRINT (dp << "\n[scop-detection-fail] Discarding one loop SCoP"; DEBUG_PRINT (dp << "[scop-detection-fail] Discarding one loop SCoP.\n";
print_sese (dump_file, s)); print_sese (dump_file, s));
return; return;
} }
if (get_exit_bb (s) == EXIT_BLOCK_PTR_FOR_FN (cfun)) if (get_exit_bb (s) == EXIT_BLOCK_PTR_FOR_FN (cfun))
{ {
DEBUG_PRINT (dp << "\n[scop-detection-fail] " DEBUG_PRINT (dp << "[scop-detection-fail] "
<< "Discarding SCoP exiting to return"; << "Discarding SCoP exiting to return.";
print_sese (dump_file, s)); print_sese (dump_file, s));
return; return;
} }
...@@ -1033,7 +1033,7 @@ scop_detection::add_scop (sese_l s) ...@@ -1033,7 +1033,7 @@ scop_detection::add_scop (sese_l s)
remove_intersecting_scops (s); remove_intersecting_scops (s);
scops.safe_push (s); scops.safe_push (s);
DEBUG_PRINT (dp << "\nAdding SCoP "; print_sese (dump_file, s)); DEBUG_PRINT (dp << "Adding SCoP "; print_sese (dump_file, s));
} }
/* Return true when a statement in SCOP cannot be represented by Graphite. /* Return true when a statement in SCOP cannot be represented by Graphite.
...@@ -1047,7 +1047,7 @@ scop_detection::harmful_stmt_in_region (sese_l scop) const ...@@ -1047,7 +1047,7 @@ scop_detection::harmful_stmt_in_region (sese_l scop) const
basic_block exit_bb = get_exit_bb (scop); basic_block exit_bb = get_exit_bb (scop);
basic_block entry_bb = get_entry_bb (scop); basic_block entry_bb = get_entry_bb (scop);
DEBUG_PRINT (dp << "\n[checking-harmful-bbs] "; DEBUG_PRINT (dp << "[checking-harmful-bbs] ";
print_sese (dump_file, scop)); print_sese (dump_file, scop));
gcc_assert (dominated_by_p (CDI_DOMINATORS, exit_bb, entry_bb)); gcc_assert (dominated_by_p (CDI_DOMINATORS, exit_bb, entry_bb));
...@@ -1112,7 +1112,7 @@ scop_detection::remove_subscops (sese_l s1) ...@@ -1112,7 +1112,7 @@ scop_detection::remove_subscops (sese_l s1)
{ {
if (subsumes (s1, *s2)) if (subsumes (s1, *s2))
{ {
DEBUG_PRINT (dp << "\nRemoving sub-SCoP"; DEBUG_PRINT (dp << "Removing sub-SCoP";
print_sese (dump_file, *s2)); print_sese (dump_file, *s2));
scops.unordered_remove (j); scops.unordered_remove (j);
} }
...@@ -1147,8 +1147,9 @@ scop_detection::remove_intersecting_scops (sese_l s1) ...@@ -1147,8 +1147,9 @@ scop_detection::remove_intersecting_scops (sese_l s1)
{ {
if (intersects (s1, *s2)) if (intersects (s1, *s2))
{ {
DEBUG_PRINT (dp << "\nRemoving intersecting SCoP"; DEBUG_PRINT (dp << "Removing intersecting SCoP";
print_sese (dump_file, *s2); dp << "Intersects with:"; print_sese (dump_file, *s2);
dp << "Intersects with:";
print_sese (dump_file, s1)); print_sese (dump_file, s1));
scops.unordered_remove (j); scops.unordered_remove (j);
} }
...@@ -1721,7 +1722,7 @@ build_cross_bb_scalars_use (scop_p scop, tree use, gimple *use_stmt, ...@@ -1721,7 +1722,7 @@ build_cross_bb_scalars_use (scop_p scop, tree use, gimple *use_stmt,
gimple *def_stmt = SSA_NAME_DEF_STMT (use); gimple *def_stmt = SSA_NAME_DEF_STMT (use);
if (gimple_bb (def_stmt) != gimple_bb (use_stmt)) if (gimple_bb (def_stmt) != gimple_bb (use_stmt))
{ {
DEBUG_PRINT (dp << "\nAdding scalar read:"; DEBUG_PRINT (dp << "Adding scalar read:";
print_generic_expr (dump_file, use, 0); print_generic_expr (dump_file, use, 0);
dp << "\nFrom stmt:"; dp << "\nFrom stmt:";
print_gimple_stmt (dump_file, use_stmt, 0, 0)); print_gimple_stmt (dump_file, use_stmt, 0, 0));
......
...@@ -273,19 +273,9 @@ extract_affine_mul (scop_p s, tree e, __isl_take isl_space *space) ...@@ -273,19 +273,9 @@ extract_affine_mul (scop_p s, tree e, __isl_take isl_space *space)
static isl_id * static isl_id *
isl_id_for_ssa_name (scop_p s, tree e) isl_id_for_ssa_name (scop_p s, tree e)
{ {
const char *name = get_name (e); char name1[10];
isl_id *id; snprintf (name1, sizeof (name1), "P_%d", SSA_NAME_VERSION (e));
return isl_id_alloc (s->isl_context, name1, e);
if (name)
id = isl_id_alloc (s->isl_context, name, e);
else
{
char name1[10];
snprintf (name1, sizeof (name1), "P_%d", SSA_NAME_VERSION (e));
id = isl_id_alloc (s->isl_context, name1, e);
}
return id;
} }
/* Return an ISL identifier for the data reference DR. Data references and /* Return an ISL identifier for the data reference DR. Data references and
......
2015-11-30 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>
* gcc.dg/graphite/pr35356-1.c: Adjust pattern.
2015-11-30 Cesar Philippidis <cesar@codesourcery.com> 2015-11-30 Cesar Philippidis <cesar@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com>
......
...@@ -34,4 +34,4 @@ if (n >= k + 1 && k >= 0) { ...@@ -34,4 +34,4 @@ if (n >= k + 1 && k >= 0) {
*/ */
/* { dg-final { scan-tree-dump-times "if \\\(n >= k \\\+ 1 && k >= 0\\\) \\\{" 1 "graphite" } } */ /* { dg-final { scan-tree-dump-times "if \\\(P_9 >= P_10 \\\+ 1 && P_10 >= 0\\\) \\\{" 1 "graphite" } } */
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