mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
efeeb755192cb03e5b24b44cb4fb563c11626a8e
This overrides vector_costs::better_main_loop_than_p to avoid regressing gcc.target/i386/vect-partial-vectors-2.c with --param ix86-vect-compare-costs=1. As the user (or a tuning model) asks for masked epilogs the vectorizer considers to mask the main loop in case it effectively works as a standalone vector epilog due to known small number of iterations of the loop. While the generic cost compare rightfully figures masking of AVX is more expensive than not masking with SSE it does not consider the cost of the epilog. This compensates with a x86 specific heuristic that prefers the masked loop if the loop cannot be vectorized with a non-masked main loop and at most a single vector epilog plus a single scalar epilog iteration. This is a reasonable heuristic for x86 and a small number of iterations as icache footprint matters here, so considering the possibility of 3 vector epilogs and 1 scalar iteration does not look profitable. Unless testcases will prove to us otherwise. I'm not sure if it makes sense to preserve --param ix86-vect-compare-costs=0 in the end, if people think so I'll duplicate the testcase with both modes explicitly specified. * tree-vectorizer.h (vector_costs::vinfo): New accessor. * config/i386/i386.cc (ix86_vector_costs::better_main_loop_than_p): Prefer a masked main loop if we can elide enough of (vector) epilog loop iterations.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
30.8%
C
30.2%
Ada
14.4%
D
6.1%
Go
5.7%
Other
12.3%