From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id 29A373858414 for ; Mon, 6 Sep 2021 12:43:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 29A373858414 Received: by mail-ed1-x52c.google.com with SMTP id g21so9387050edw.4 for ; Mon, 06 Sep 2021 05:43:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OFSIa29SJT3fbZ0VoLqX9BFJF1WPGcsx/KebegpNEYI=; b=uOkVxgRG3S//Z+Gz4enMnUykoNtaYtnxkj6O4cUM18LkYgC2YjuGrgws3FtdNBOa8v sIq6tp/ojDRqIBXR4lmZVj0mrTzaIeJYrxfwVetYWKqs/ZrvuClEJuPFQxRyodZo3slB xSU8D3vAMdrknYzqXZJ5rWw+uyLiWRYloAqDD0X6d7PdStkos2cgRaLrecVzYXbYFv9M vhhU+EkRaVtjB4NsPHMPzrGDoQkql0gaEFXsjSvbwzWBWB2UF5lys/GKSrau0QiwZLYu QdD9XRynQG1akK140iQS97FY3mb9OSmrs56/N+wj3/kZQOViWt7S45cI7ydbVzQHfM7L JrAQ== X-Gm-Message-State: AOAM5323Ov/s+ycXE09sYMAwX9QX5hWO8N4G90NYeUZJC7ivfmjqyY9d wtsR3GwrJEMwvO46v+hedHemIeKJTnBdCuC35uI= X-Google-Smtp-Source: ABdhPJw51tCSVthaQ4xoH1LT4ZviNttgDoujLwuciz39M0v3MJ5MzmoaYs4nV1BqtQxpKEnb05mzhazn+/nBT/IuYiI= X-Received: by 2002:a50:ed0b:: with SMTP id j11mr13133600eds.97.1630932231290; Mon, 06 Sep 2021 05:43:51 -0700 (PDT) MIME-Version: 1.0 References: <20210906084614.7974-1-hongtao.liu@intel.com> <20210906094127.GQ920497@tucnak> <20210906110141.GS920497@tucnak> <20210906111512.GT920497@tucnak> <20210906123024.GX920497@tucnak> In-Reply-To: <20210906123024.GX920497@tucnak> From: Richard Biener Date: Mon, 6 Sep 2021 14:43:40 +0200 Message-ID: Subject: Re: [PATCH] Enable auto-vectorization at O2 with very-cheap cost model. To: Jakub Jelinek Cc: "Joseph S. Myers" , Hongtao Liu , liuhongt , GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2021 12:43:53 -0000 On Mon, Sep 6, 2021 at 2:30 PM Jakub Jelinek wrote: > > On Mon, Sep 06, 2021 at 02:18:59PM +0200, Richard Biener wrote: > > On Mon, Sep 6, 2021 at 1:15 PM Jakub Jelinek wrote: > > > > > > On Mon, Sep 06, 2021 at 07:15:41PM +0800, Hongtao Liu wrote: > > > > > So what about finish_options then? > > > > > default_options_optimization has only a single caller that then calls > > > > > read_cmdline_options and then finish_options. > > > > in finish_options > > > > (gdb) p opts_set->x_flag_tree_loop_vectorize > > > > $37 = 1 > > > > with -O2 -ftree-loop-vectorize, > > > > > > > > but > > > > 1000 if (opts->x_dump_base_name > > > > (gdb) p opts_set->x_flag_tree_loop_vectorize > > > > $38 = 0 > > > > for -O2 -ftree-vectorize??? > > > > > > > > Any magic for ftree-vectorize w/ EnabledBy??? > > > > > > I guess a way to get this working would be: > > > ; Alias to enable both -ftree-loop-vectorize and -ftree-slp-vectorize. > > > ftree-vectorize > > > -Common Optimization > > > +Common Var(flag_tree_vectorize) Optimization > > > Enable vectorization on trees. > > > > > > and then you can test both > > > opts_set->x_flag_tree_vectorize > > > and > > > opts_set->x_flag_tree_loop_vectorize > > > > Or make EnabledBy have set opts_set-> as well. > > That would change a little bit what *_set->x_* means. > > If user has explicit -O2, we have *_set->x_optimize set, > but don't enable it on all the suboptions that are implicitly > enabled because explicit -O2 has been used. > And isn't EnabledBy practically the same? If user writes > -Wall explicitly which implicitly enables hundreds of warning > options, do we want just Wall or also all the other options > marked as explicit? E.g. backend code than can't easily differentiate > between -Wwhatever and -Wall implying -Wwhatever and e.g. changing that > if implicit only. Hmm, good point. Richard. > > Jakub >