aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-04-08 12:35:26 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-04-08 12:35:26 +0000
commit451dabda42522372cfe55e7b6433b19b6df625d2 (patch)
treeb4ce6ba90777b215dbdb2ce921d49e0d214ccb4b
parent3b088b475ae0a65236db759996dce4406b6abb70 (diff)
downloadgcc-451dabda42522372cfe55e7b6433b19b6df625d2.zip
gcc-451dabda42522372cfe55e7b6433b19b6df625d2.tar.gz
gcc-451dabda42522372cfe55e7b6433b19b6df625d2.tar.bz2
gimple-pretty-print.c (debug_gimple_stmt): Do not print extra newline.
2013-04-08 Richard Biener <rguenther@suse.de> * gimple-pretty-print.c (debug_gimple_stmt): Do not print extra newline. * tree-vect-loop.c (vect_determine_vectorization_factor): Dump determined vector type. (vect_analyze_data_refs): Likewise. (vect_get_new_vect_var): Adjust. (vect_create_destination_var): Preserve SSA name versions. * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Do not dump anything here. * gfortran.dg/vect/fast-math-mgrid-resid.f: Adjust. From-SVN: r197578
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/gimple-pretty-print.c1
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f2
-rw-r--r--gcc/tree-vect-data-refs.c31
-rw-r--r--gcc/tree-vect-loop.c6
-rw-r--r--gcc/tree-vect-stmts.c22
7 files changed, 47 insertions, 31 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c16ea07..324c56b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2013-04-08 Richard Biener <rguenther@suse.de>
+
+ * gimple-pretty-print.c (debug_gimple_stmt): Do not print
+ extra newline.
+ * tree-vect-loop.c (vect_determine_vectorization_factor): Dump
+ determined vector type.
+ (vect_analyze_data_refs): Likewise.
+ (vect_get_new_vect_var): Adjust.
+ (vect_create_destination_var): Preserve SSA name versions.
+ * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Do
+ not dump anything here.
+
2013-04-08 Joern Rennecke <joern.rennecke@embecosm.com>
* config/epiphany/epiphany.h (struct GTY (()) machine_function):
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index f3e66d6..ddb086c 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -84,7 +84,6 @@ DEBUG_FUNCTION void
debug_gimple_stmt (gimple gs)
{
print_gimple_stmt (stderr, gs, 0, TDF_VOPS|TDF_MEMSYMS);
- fprintf (stderr, "\n");
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ead44ac..8893979 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2013-04-08 Richard Biener <rguenther@suse.de>
+ * gfortran.dg/vect/fast-math-mgrid-resid.f: Adjust.
+
+2013-04-08 Richard Biener <rguenther@suse.de>
+
* gfortran.dg/vect/fast-math-pr37021.f90: Adjust.
2013-04-08 Richard Biener <rguenther@suse.de>
diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
index 8f196a6..978b871 100644
--- a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
+++ b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
@@ -41,6 +41,6 @@ C
! we want to check that predictive commoning did something on the
! vectorized loop, which means we have to have exactly 13 vector
! additions.
-! { dg-final { scan-tree-dump-times "vect_var\[^\\n\]*\\+ " 13 "optimized" } }
+! { dg-final { scan-tree-dump-times "vect_\[^\\n\]*\\+ " 13 "optimized" } }
! { dg-final { cleanup-tree-dump "vect" } }
! { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 5d07cae..14593b5 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -3206,6 +3206,17 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
}
return false;
}
+ else
+ {
+ if (dump_enabled_p ())
+ {
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "got vectype for stmt: ");
+ dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
+ dump_generic_expr (MSG_NOTE, TDF_SLIM,
+ STMT_VINFO_VECTYPE (stmt_info));
+ }
+ }
/* Adjust the minimal vectorization factor according to the
vector type. */
@@ -3293,13 +3304,13 @@ vect_get_new_vect_var (tree type, enum vect_var_kind var_kind, const char *name)
switch (var_kind)
{
case vect_simple_var:
- prefix = "vect_";
+ prefix = "vect";
break;
case vect_scalar_var:
- prefix = "stmp_";
+ prefix = "stmp";
break;
case vect_pointer_var:
- prefix = "vect_p";
+ prefix = "vectp";
break;
default:
gcc_unreachable ();
@@ -3307,7 +3318,7 @@ vect_get_new_vect_var (tree type, enum vect_var_kind var_kind, const char *name)
if (name)
{
- char* tmp = concat (prefix, name, NULL);
+ char* tmp = concat (prefix, "_", name, NULL);
new_vect_var = create_tmp_reg (type, tmp);
free (tmp);
}
@@ -3836,7 +3847,8 @@ tree
vect_create_destination_var (tree scalar_dest, tree vectype)
{
tree vec_dest;
- const char *new_name;
+ const char *name;
+ char *new_name;
tree type;
enum vect_var_kind kind;
@@ -3845,10 +3857,13 @@ vect_create_destination_var (tree scalar_dest, tree vectype)
gcc_assert (TREE_CODE (scalar_dest) == SSA_NAME);
- new_name = get_name (scalar_dest);
- if (!new_name)
- new_name = "var_";
+ name = get_name (scalar_dest);
+ if (name)
+ asprintf (&new_name, "%s_%u", name, SSA_NAME_VERSION (scalar_dest));
+ else
+ asprintf (&new_name, "_%u", SSA_NAME_VERSION (scalar_dest));
vec_dest = vect_get_new_vect_var (type, kind, new_name);
+ free (new_name);
return vec_dest;
}
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 542082f..6874b65 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -409,6 +409,12 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
}
STMT_VINFO_VECTYPE (stmt_info) = vectype;
+
+ if (dump_enabled_p ())
+ {
+ dump_printf_loc (MSG_NOTE, vect_location, "vectype: ");
+ dump_generic_expr (MSG_NOTE, TDF_SLIM, vectype);
+ }
}
/* The vectorization factor is according to the smallest
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index a5bd819..3590e39 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -6094,30 +6094,10 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, unsigned size)
return NULL_TREE;
vectype = build_vector_type (scalar_type, nunits);
- if (dump_enabled_p ())
- {
- dump_printf_loc (MSG_NOTE, vect_location,
- "get vectype with %d units of type ", nunits);
- dump_generic_expr (MSG_NOTE, TDF_SLIM, scalar_type);
- }
-
- if (!vectype)
- return NULL_TREE;
-
- if (dump_enabled_p ())
- {
- dump_printf_loc (MSG_NOTE, vect_location, "vectype: ");
- dump_generic_expr (MSG_NOTE, TDF_SLIM, vectype);
- }
if (!VECTOR_MODE_P (TYPE_MODE (vectype))
&& !INTEGRAL_MODE_P (TYPE_MODE (vectype)))
- {
- if (dump_enabled_p ())
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "mode not supported by target.");
- return NULL_TREE;
- }
+ return NULL_TREE;
return vectype;
}