From: Sharad Singhai Date: Fri, 18 Jan 2013 18:26:04 +0000 (+0000) Subject: re PR tree-optimization/55995 (vect increase_alignment notes missing from dump file) X-Git-Tag: releases/gcc-4.8.0~860 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3d7af04118e10c592dfdd9502a8368df3d34853;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2be4cf37615a..31132772e015 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 915948adc6ff..ddd7c962cc2b 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 c2098a4ae784..20ebbbb872af 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 1b474c37ee13..bea7ee0064ba 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 66b46a08b93b..42ebb8d250f5 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) {