From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68601 invoked by alias); 13 Nov 2017 20:19:38 -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 68591 invoked by uid 89); 13 Nov 2017 20:19:38 -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= X-HELO: mail-it0-f65.google.com Received: from mail-it0-f65.google.com (HELO mail-it0-f65.google.com) (209.85.214.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Nov 2017 20:19:37 +0000 Received: by mail-it0-f65.google.com with SMTP id r127so10871403itb.5 for ; Mon, 13 Nov 2017 12:19:36 -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=2Yf4E5nCrlAugQOgd6dXOJzmMtopxJxTPEIXjcQBGaM=; b=KKGzEOTxWK+R7w8gDcdnONPyAZfzwKM9eeniIx2xrRyXJPl1j3YWBZXynwc7xIYk++ 9DDR5LlE9SmHqWGfswXpvN8zxbuXnHBx4L5GzrBBKwMC1Cz+PtazccP8BEHW/zIRnGn6 ajjJPNYPCCx+I43QIBeovZzZ5Ev/ZNCZlo19Iq/QHSVtKCEvsgxBpuUKDIEleFejlk/U ydEa/EQj+xNgiBkvr48bAP51BWjdMX/HYQlhC+e9HLaWkVgL6AgMgSh9UGiE/5iX4eUq YSVpyaoM7fPqYs2l5ypRHWsmyjA/tA8uDupjLE7VxQHsrdvBQrJaFG3tfaOetFbMy5b7 7cSg== X-Gm-Message-State: AJaThX6Syj39VBsPKlA9k6HzeGpxT8TnnMiVwNEuEw8EsT9h0CSDPyfO G7ARUpRbQ6H+upLVG6Mkr7YOsItFoSMOTLg3LMQ= X-Google-Smtp-Source: AGs4zMZfguq13FT76x0KFIQ4AGXiQc7uS0DCfF7oBo6vgR0+yDAMQE3XpilJHeVUukKDuvvSviMuH39L4q43raflCK0= X-Received: by 10.36.5.149 with SMTP id 143mr12608978itl.105.1510604375438; Mon, 13 Nov 2017 12:19:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.156.105 with HTTP; Mon, 13 Nov 2017 12:19:34 -0800 (PST) In-Reply-To: References: <71475DE127B5E94A8E189586234C088822AE2AC8@irsmsx105.ger.corp.intel.com> From: Uros Bizjak Date: Mon, 13 Nov 2017 20:32: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/msg01019.txt.bz2 On Mon, Nov 13, 2017 at 9:13 PM, Uros Bizjak wrote: > 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.] ... or we can simply mark -mprefer-avx128 with Alias(mprefer-vector-width=, 128, 256) to keep it 100% backward compatible. Uros.