From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42847 invoked by alias); 13 Nov 2017 20:13:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 42545 invoked by uid 89); 13 Nov 2017 20:13:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:209.85.214.68, H*RU:209.85.214.68 X-HELO: mail-it0-f68.google.com Received: from mail-it0-f68.google.com (HELO mail-it0-f68.google.com) (209.85.214.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Nov 2017 20:13:43 +0000 Received: by mail-it0-f68.google.com with SMTP id n134so2358884itg.3 for ; Mon, 13 Nov 2017 12:13:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qQ7lE+ntgYL/XZ+OaOVk08fdXKah0dkQvg5a4Em52/k=; b=X6FU8knW5CHi6EpFyioqozVMXADpBrTVJng2NLnZ9blcfBMvLyP3Iwk0L53+GOVBzm NATYVVgliTTwPEM+u5Bpp74u36KsKAYsBJV/bwaBWXmNgm85pboIVPZwfVDj1K7Vpl2W AjAVwNkGYXGRVf3JmzEawZuaQNLDutWwEqVEcHjeENRMVyEffaXbWfXRLEueMt3zFLER W0VbN3EyMez6x6G2Px3W7LIfy4okr9n1FCOCam54xqYblBlY43Kq+y03524G+j9SfzVY Mew5TIvD1O5lk9j+y/+rmqlaTkB7ySDqaKnPVvtLiaXNSQE70lyw3K6+h++JSUMPXBK4 vCDw== X-Gm-Message-State: AJaThX61kTbWiqy5jGmTSB4DenaWV0kDnW6o1Qc/Pe36/DymnVL2WaYQ 2W7ILLUk8YuGFwh2+Kzjdh5L5EQw8Tk1XUDVMF0= X-Google-Smtp-Source: AGs4zMagJasEuUtojHHGtR7LXq4ynrgRiRChy35tElC05q8eV9PijubYyDnYmqYXVAFnz2LKFIQCtsJEkzJp6coLccQ= X-Received: by 10.36.137.69 with SMTP id s66mr12186497itd.22.1510604021748; Mon, 13 Nov 2017 12:13:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.156.105 with HTTP; Mon, 13 Nov 2017 12:13:41 -0800 (PST) In-Reply-To: <71475DE127B5E94A8E189586234C088822AE2AC8@irsmsx105.ger.corp.intel.com> References: <71475DE127B5E94A8E189586234C088822AE2AC8@irsmsx105.ger.corp.intel.com> From: Uros Bizjak Date: Mon, 13 Nov 2017 20:23:00 -0000 Message-ID: Subject: Re: [PATCH, i386] Refactor -mprefer-avx[128|256] options into common -mprefer-vector-width=[none|128|256|512] To: "Shalnov, Sergey" Cc: "gcc-patches@gcc.gnu.org" , "kirill.yukhin@gmail.com" , "Koval, Julia" , "Senkevich, Andrew" , "Peryt, Sebastian" , "Ivchenko, Alexander" Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-11/txt/msg01018.txt.bz2 On Mon, Nov 13, 2017 at 6:25 PM, Shalnov, Sergey 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.