aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Kumar <aditya.k7@samsung.com>2015-11-30 20:29:15 +0000
committerSebastian Pop <spop@gcc.gnu.org>2015-11-30 20:29:15 +0000
commit49385686db08da967279598d5079050794884e58 (patch)
treeb2af9c201e16f57627a00ca1aeb7631dce66b9be
parentdb941d7ef7b191700ad4467800dd0324365e474e (diff)
downloadgcc-49385686db08da967279598d5079050794884e58.zip
gcc-49385686db08da967279598d5079050794884e58.tar.gz
gcc-49385686db08da967279598d5079050794884e58.tar.bz2
always print parameter names as P_{SSA_NAME_VERSION}
Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r231085
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/graphite-isl-ast-to-gimple.c4
-rw-r--r--gcc/graphite-scop-detection.c31
-rw-r--r--gcc/graphite-sese-to-poly.c16
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr35356-1.c2
6 files changed, 34 insertions, 31 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a1b4eff..dbcc3d9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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>
* tree-nested.c (convert_nonlocal_omp_clauses): Add support for
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index 33423dd..16cb5fa 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -2220,7 +2220,7 @@ translate_isl_ast_to_gimple::copy_loop_close_phi_args (basic_block old_bb,
get_loc (old_name));
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);
}
@@ -2265,7 +2265,7 @@ translate_isl_ast_to_gimple::copy_loop_close_phi_nodes (basic_block old_bb,
basic_block new_bb)
{
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);
/* Loop close phi nodes should have only one argument. */
gcc_assert (1 == EDGE_COUNT (old_bb->preds));
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 1f8fc76..2f4231a 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -382,7 +382,7 @@ canonicalize_loop_closed_ssa (loop_p loop)
if (single_pred_p (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);
}
else
@@ -391,7 +391,7 @@ canonicalize_loop_closed_ssa (loop_p loop)
basic_block close = split_edge (e);
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");
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
combined.exit = single_succ_edge (imm_succ);
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";
print_sese (dump_file, combined));
return invalid_sese;
@@ -870,7 +870,7 @@ scop_detection::build_scop_depth (sese_l s, loop_p loop)
if (!loop)
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);
sese_l s2 = merge_sese (s, get_sese (loop));
@@ -895,7 +895,7 @@ scop_detection::build_scop_breadth (sese_l s1, loop_p loop)
{
if (!loop)
return s1;
- DEBUG_PRINT (dp << "\n[Breadth loop_" << loop->num << "]");
+ DEBUG_PRINT (dp << "[Breadth loop_" << loop->num << "]\n");
gcc_assert (s1);
loop_p l = loop;
@@ -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))
{
DEBUG_PRINT (dp << "[valid-scop] loop_" << loop->num
- << "is a valid scop.\n");
+ << " is a valid scop.\n");
return true;
}
return false;
@@ -1013,15 +1013,15 @@ scop_detection::add_scop (sese_l s)
/* Do not add scops with only one loop. */
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));
return;
}
if (get_exit_bb (s) == EXIT_BLOCK_PTR_FOR_FN (cfun))
{
- DEBUG_PRINT (dp << "\n[scop-detection-fail] "
- << "Discarding SCoP exiting to return";
+ DEBUG_PRINT (dp << "[scop-detection-fail] "
+ << "Discarding SCoP exiting to return.";
print_sese (dump_file, s));
return;
}
@@ -1033,7 +1033,7 @@ scop_detection::add_scop (sese_l s)
remove_intersecting_scops (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.
@@ -1047,7 +1047,7 @@ scop_detection::harmful_stmt_in_region (sese_l scop) const
basic_block exit_bb = get_exit_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));
gcc_assert (dominated_by_p (CDI_DOMINATORS, exit_bb, entry_bb));
@@ -1112,7 +1112,7 @@ scop_detection::remove_subscops (sese_l s1)
{
if (subsumes (s1, *s2))
{
- DEBUG_PRINT (dp << "\nRemoving sub-SCoP";
+ DEBUG_PRINT (dp << "Removing sub-SCoP";
print_sese (dump_file, *s2));
scops.unordered_remove (j);
}
@@ -1147,8 +1147,9 @@ scop_detection::remove_intersecting_scops (sese_l s1)
{
if (intersects (s1, *s2))
{
- DEBUG_PRINT (dp << "\nRemoving intersecting SCoP";
- print_sese (dump_file, *s2); dp << "Intersects with:";
+ DEBUG_PRINT (dp << "Removing intersecting SCoP";
+ print_sese (dump_file, *s2);
+ dp << "Intersects with:";
print_sese (dump_file, s1));
scops.unordered_remove (j);
}
@@ -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);
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);
dp << "\nFrom stmt:";
print_gimple_stmt (dump_file, use_stmt, 0, 0));
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index e680243..7ef01fb 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -273,19 +273,9 @@ extract_affine_mul (scop_p s, tree e, __isl_take isl_space *space)
static isl_id *
isl_id_for_ssa_name (scop_p s, tree e)
{
- const char *name = get_name (e);
- isl_id *id;
-
- 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;
+ char name1[10];
+ snprintf (name1, sizeof (name1), "P_%d", SSA_NAME_VERSION (e));
+ return isl_id_alloc (s->isl_context, name1, e);
}
/* Return an ISL identifier for the data reference DR. Data references and
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7cc59de..4aabe7b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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>
Nathan Sidwell <nathan@codesourcery.com>
diff --git a/gcc/testsuite/gcc.dg/graphite/pr35356-1.c b/gcc/testsuite/gcc.dg/graphite/pr35356-1.c
index 6d82579..0eb714c 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr35356-1.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr35356-1.c
@@ -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" } } */