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]

[patch] enabling vectorization by default at -O3


Hi,

It has recently been proposed/requested that the vectorizer be turned on by
default with -O3.  I think it's a good idea in principle, though I don't
know how bad the impact on the compiler's stability would be in the
immediate term. We could give it a try, and decide to turn it off again if
things don't stabilize quickly enough. This will probably require a joint
effort, so it makes sense to go into this adventure only if people are
interested in giving this a try (i.e. help!). In terms of stability I can
currently report that:

- I didn't see any regressions in SPEC2006 due to vectorization on
powerpc64-linux. We have yet to check SPEC2006 on x86.

- I tested our entire testsuite with vectorization enabled on
powerpc64-linux and i386-linux. Found 3 ICEs (one fix to be committed soon
- http://gcc.gnu.org/ml/gcc-patches/2007-09/msg00261.html, other two will
follow).

- There are about 4 vectorizer-related wrong-code/ICE PRs in our Bugzilla
(thanks to everyone who has been tackling those!).

- We pass bootstrap with vectorization enabled on i386-linux and
x86_64-linux. However we don't pass bootstrap with vectorization enabled on
powerpc-linux due to a problem that seems to be related to the vectorizer
changing the alignment of some data (Zdenek may have more details on that,
see PR32582).  (This data-alignment problem seems to have other
occurrences, e.g. PR32893).  I don't know what is the bootstrap status (w
vectorization) on other platforms.

(Any working hands willing to help with the above issues are more than
welcome...)

None of the above, however, is an official prerequisite to committing the
attached patch, which turns on the vectorizer for optimization level >= 3.
It passed bootstrapped on powerpc64-linux and i386-linux. Full regression
testing on these two platforms is in progress. Would it be acceptable to
commit this patch if testing completes with no regressions (considering the
open issues mentioned above)?

thanks,
dorit

ChangeLog:

      * opts.c (decode_options): Turn on vectorization for -O3.

Index: opts.c
===================================================================
*** opts.c      (revision 128037)
--- opts.c      (working copy)
*************** decode_options (unsigned int argc, const
*** 862,867 ****
--- 862,868 ----
        flag_inline_functions = 1;
        flag_unswitch_loops = 1;
        flag_gcse_after_reload = 1;
+       flag_tree_vectorize = 1;

        /* Allow even more virtual operators.  */
        set_param_value ("max-aliased-vops", 1000);


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