* [PATCH] Fix ICE in vectorization dump (PR tree-optimization/55995)
@ 2013-01-18 8:52 Sharad Singhai
2013-01-18 10:04 ` Richard Biener
0 siblings, 1 reply; 3+ messages in thread
From: Sharad Singhai @ 2013-01-18 8:52 UTC (permalink / raw)
To: janis, Richard Biener; +Cc: gcc-patches
This patch fixes an ICE in vectorization dump when section anchors are present.
Bootstrapped/tested on x86_64 and PPC 64 and found no new failures. OK
for trunk?
Thanks,
Sharad
2013-01-18 Sharad Singhai <singhai@google.com>
PR tree-optimization/55995
* dumpfile.c (dump_loc): Print location only if available.
* testsuite/gcc.dg/vect/vect.exp: Use "details" flags for dump info.
* tree-vectorizer.c (increase_alignment): Intialize vect_location.
Index: dumpfile.c
===================================================================
--- dumpfile.c (revision 195244)
+++ dumpfile.c (working copy)
@@ -260,14 +260,13 @@ dump_loc (int dump_kind, FILE *dfile, source_locat
/* 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));
}
}
Index: testsuite/gcc.dg/vect/vect.exp
===================================================================
--- testsuite/gcc.dg/vect/vect.exp (revision 195244)
+++ testsuite/gcc.dg/vect/vect.exp (working copy)
@@ -156,7 +156,8 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdi
# 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
Index: tree-vectorizer.c
===================================================================
--- tree-vectorizer.c (revision 195244)
+++ tree-vectorizer.c (working copy)
@@ -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)
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix ICE in vectorization dump (PR tree-optimization/55995)
2013-01-18 8:52 [PATCH] Fix ICE in vectorization dump (PR tree-optimization/55995) Sharad Singhai
@ 2013-01-18 10:04 ` Richard Biener
2013-01-18 10:11 ` Jakub Jelinek
0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2013-01-18 10:04 UTC (permalink / raw)
To: Sharad Singhai; +Cc: janis, gcc-patches
On Fri, Jan 18, 2013 at 9:51 AM, Sharad Singhai <singhai@google.com> wrote:
> This patch fixes an ICE in vectorization dump when section anchors are present.
>
> Bootstrapped/tested on x86_64 and PPC 64 and found no new failures. OK
> for trunk?
Ok.
Thanks,
Richard.
> Thanks,
> Sharad
>
> 2013-01-18 Sharad Singhai <singhai@google.com>
>
> PR tree-optimization/55995
> * dumpfile.c (dump_loc): Print location only if available.
> * testsuite/gcc.dg/vect/vect.exp: Use "details" flags for dump info.
> * tree-vectorizer.c (increase_alignment): Intialize vect_location.
>
> Index: dumpfile.c
> ===================================================================
> --- dumpfile.c (revision 195244)
> +++ dumpfile.c (working copy)
> @@ -260,14 +260,13 @@ dump_loc (int dump_kind, FILE *dfile, source_locat
> /* 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));
> }
> }
>
> Index: testsuite/gcc.dg/vect/vect.exp
> ===================================================================
> --- testsuite/gcc.dg/vect/vect.exp (revision 195244)
> +++ testsuite/gcc.dg/vect/vect.exp (working copy)
> @@ -156,7 +156,8 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdi
>
> # 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
>
> Index: tree-vectorizer.c
> ===================================================================
> --- tree-vectorizer.c (revision 195244)
> +++ tree-vectorizer.c (working copy)
> @@ -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)
> {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix ICE in vectorization dump (PR tree-optimization/55995)
2013-01-18 10:04 ` Richard Biener
@ 2013-01-18 10:11 ` Jakub Jelinek
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2013-01-18 10:11 UTC (permalink / raw)
To: Sharad Singhai; +Cc: gcc-patches
On Fri, Jan 18, 2013 at 11:04:32AM +0100, Richard Biener wrote:
> > 2013-01-18 Sharad Singhai <singhai@google.com>
> >
> > PR tree-optimization/55995
> > * dumpfile.c (dump_loc): Print location only if available.
> > * testsuite/gcc.dg/vect/vect.exp: Use "details" flags for dump info.
> > * tree-vectorizer.c (increase_alignment): Intialize vect_location.
Please make sure to put the vect.exp change into gcc/testsuite/ChangeLog
without testsuite/ prefix and the rest into gcc/ChangeLog (and also tab
indent the lines starting with PR and *.
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-18 10:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-18 8:52 [PATCH] Fix ICE in vectorization dump (PR tree-optimization/55995) Sharad Singhai
2013-01-18 10:04 ` Richard Biener
2013-01-18 10:11 ` Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).