From a3d7af04118e10c592dfdd9502a8368df3d34853 Mon Sep 17 00:00:00 2001 From: Sharad Singhai Date: Fri, 18 Jan 2013 18:26:04 +0000 Subject: [PATCH] re PR tree-optimization/55995 (vect increase_alignment notes missing from dump file) 2013-01-18 Sharad Singhai PR tree-optimization/55995 * dumpfile.c (dump_loc): Print location only if available. * tree-vectorizer.c (increase_alignment): Intialize vect_location. testsuite/ChangeLog PR tree-optimization/55995 * gcc.dg/vect/vect.exp: Use "details" flags for dump info. From-SVN: r195303 --- gcc/ChangeLog | 6 ++++++ gcc/dumpfile.c | 9 ++++----- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/vect/vect.exp | 3 ++- gcc/tree-vectorizer.c | 2 ++ 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2be4cf37615..31132772e01 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-01-18 Sharad Singhai + + PR tree-optimization/55995 + * dumpfile.c (dump_loc): Print location only if available. + * tree-vectorizer.c (increase_alignment): Intialize vect_location. + 2013-01-18 Vladimir Makarov PR target/55433 diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index 915948adc6f..ddd7c962cc2 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -260,14 +260,13 @@ dump_loc (int dump_kind, FILE *dfile, source_location loc) /* Currently vectorization passes print location information. */ if (dump_kind) { - if (loc == UNKNOWN_LOCATION) + if (loc != UNKNOWN_LOCATION) + fprintf (dfile, "\n%s:%d: note: ", LOCATION_FILE (loc), + LOCATION_LINE (loc)); + else if (current_function_decl) fprintf (dfile, "\n%s:%d: note: ", DECL_SOURCE_FILE (current_function_decl), DECL_SOURCE_LINE (current_function_decl)); - else - fprintf (dfile, "\n%s:%d: note: ", - LOCATION_FILE (loc), - LOCATION_LINE (loc)); } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c2098a4ae78..20ebbbb872a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-01-18 Sharad Singhai + + PR tree-optimization/55995 + * gcc.dg/vect/vect.exp: Use "details" flags for dump info. + 2013-01-18 Vladimir Makarov PR target/55433 diff --git a/gcc/testsuite/gcc.dg/vect/vect.exp b/gcc/testsuite/gcc.dg/vect/vect.exp index 1b474c37ee1..bea7ee0064b 100644 --- a/gcc/testsuite/gcc.dg/vect/vect.exp +++ b/gcc/testsuite/gcc.dg/vect/vect.exp @@ -156,7 +156,8 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/section-anchors-*.\[cS\]]] # alignment-sensitive -fsection-anchors tests set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS -lappend DEFAULT_VECTCFLAGS "-fsection-anchors" "-fdump-ipa-increase_alignment" +lappend DEFAULT_VECTCFLAGS "-fsection-anchors" \ + "-fdump-ipa-increase_alignment-details" dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/aligned-section-anchors-*.\[cS\]]] \ "" $DEFAULT_VECTCFLAGS diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 66b46a08b93..42ebb8d250f 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -225,6 +225,8 @@ increase_alignment (void) { struct varpool_node *vnode; + vect_location = UNKNOWN_LOC; + /* Increase the alignment of all global arrays for vectorization. */ FOR_EACH_DEFINED_VARIABLE (vnode) { -- 2.30.2