This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386] Refactor -mprefer-avx[128|256] options into common -mprefer-vector-width=[none|128|256|512]
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "Shalnov, Sergey" <sergey dot shalnov at intel dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "kirill dot yukhin at gmail dot com" <kirill dot yukhin at gmail dot com>, "Koval, Julia" <julia dot koval at intel dot com>, "Senkevich, Andrew" <andrew dot senkevich at intel dot com>, "Peryt, Sebastian" <sebastian dot peryt at intel dot com>, "Ivchenko, Alexander" <alexander dot ivchenko at intel dot com>
- Date: Mon, 13 Nov 2017 21:13:41 +0100
- Subject: Re: [PATCH, i386] Refactor -mprefer-avx[128|256] options into common -mprefer-vector-width=[none|128|256|512]
- Authentication-results: sourceware.org; auth=none
- References: <71475DE127B5E94A8E189586234C088822AE2AC8@irsmsx105.ger.corp.intel.com>
On Mon, Nov 13, 2017 at 6:25 PM, Shalnov, Sergey
<sergey.shalnov@intel.com> wrote:
> Hi,
> Modern architectures provides wider and wider vector registers. This patch implements
> common (in i386 arch) option to prefer vector register width for the vectorizer.
> Currently, GCC has "-mprefer-avx128" and "-mprefer-avx256" options to limit maximum
> vector register width in vectorizer. To avoid feature implementation of further options
> like "-mprefer-avx512", "-mprefer-avx1024", etc. I propose to implement
> the option "-mprefer-vector-width=[none|128|256|512]".
>
> Also I propose to remove recently added -mprefer-avx256 option in favor
> of -mprefer-vector-width=256 and consider also make -mprefer-avx128 as deprecated.
> Latter one is already there for few years, so It might be better to keep it as
> deprecated for some time.
This is a good idea, but please mark -mprefer-avx128 "RejectNegative
Alias(mprefer-vector-width=, 128)". IMO, we can leave this option as
is, no need to deprecate it, or warn about its usage. Using Alias
keyword, it will be just a shortcut for -mprefer-vector-width=128.
[BTW: --mprefer-avx128 should be marked RejectNegative from the
beginning; let's just assume nobody uses it in its (somehow weird)
negative "-mno-prefer-avx128" form.]
Uros.