This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix PR/18179 and use get_inner_reference in vectorizer: part 4





Richard Henderson <rth@redhat.com> wrote on 01/01/2005 22:34:14:


> Vectorization folk, it looks like we might need to modify the testsuite
> a bit so that we can notice when this sort of thing happens.  Either a
> --param value that disables unaligned vectors, or better pattern matching
> in scan-tree-dump-times that notices when we used misalignment when we
> shouldn't have.
>

for that we can add something like:

Index: tree-vectorizer.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-vectorizer.c,v
retrieving revision 2.57
diff -c -3 -p -r2.57 tree-vectorizer.c
*** tree-vectorizer.c   4 Jan 2005 07:56:51 -0000       2.57
--- tree-vectorizer.c   4 Jan 2005 10:00:16 -0000
*************** vect_analyze_data_refs_alignment (loop_v
*** 4486,4491 ****
--- 4486,4494 ----
            fprintf (dump_file, "not vectorized: unsupported unaligned
load.");
          return false;
        }
+       if (supportable_dr_alignment != dr_aligned
+         && (vect_debug_details (loop) || vect_debug_stats (loop)))
+       fprintf (dump_file, "unaligned access.");
      }
    for (i = 0; i < VARRAY_ACTIVE_SIZE (loop_write_datarefs); i++)
      {
*************** vect_analyze_data_refs_alignment (loop_v
*** 4497,4502 ****
--- 4500,4508 ----
            fprintf (dump_file, "not vectorized: unsupported unaligned
store.");
          return false;
        }
+       if (supportable_dr_alignment != dr_aligned
+         && (vect_debug_details (loop) || vect_debug_stats (loop)))
+       fprintf (dump_file, "unaligned access.");
      }

    return true;
Index: testsuite/gcc.dg/vect/vect-65.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-65.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 vect-65.c
*** testsuite/gcc.dg/vect/vect-65.c     17 Nov 2004 23:47:21 -0000      1.4
--- testsuite/gcc.dg/vect/vect-65.c     4 Jan 2005 10:00:21 -0000
*************** int main (void)
*** 79,81 ****
--- 79,82 ----
  }

  /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
+ /* { dg-final { scan-tree-dump-times "unaligned access" 0 "vect" } } */


(along with appropriate 'dg-final ...' for all other testcases).
Shall I prepare something along these lines?

We're actually working on cleaning-up the vectorizer reports in general -
see PR18441 -  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18441), and
would be happy to get comments. This cleanup includes adding verbosity
levels, more accurate printing of the loop line-number, more informative
reports.
Would such a cleanup be acceptable for mainline?


thanks,

dorit

>
>
> r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]