On Mon, Nov 13, 2017 at 9:13 PM, Uros Bizjak <ubiz...@gmail.com> wrote: > On Mon, Nov 13, 2017 at 6:25 PM, Shalnov, Sergey > <sergey.shal...@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.]
... or we can simply mark -mprefer-avx128 with Alias(mprefer-vector-width=, 128, 256) to keep it 100% backward compatible. Uros.