From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 3197E3851C31 for ; Wed, 22 Jul 2020 17:49:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3197E3851C31 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 06MHnWSk030138; Wed, 22 Jul 2020 12:49:32 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 06MHnWRp030137; Wed, 22 Jul 2020 12:49:32 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 22 Jul 2020 12:49:31 -0500 From: Segher Boessenkool To: "Kewen.Lin" Cc: Richard Biener , GCC Patches , Bill Schmidt , Richard Sandiford Subject: Re: [PATCH v2] vect/rs6000: Support vector with length cost modeling Message-ID: <20200722174931.GB32057@gate.crashing.org> References: <419f1fad-05be-115c-1a53-cb710ae7b2dc@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Wed, 22 Jul 2020 17:49:38 -0000 Hi! On Wed, Jul 22, 2020 at 09:26:39AM +0800, Kewen.Lin wrote: > +/* For some target specific vectorization cost which can't be handled per stmt, > + we check the requisite conditions and adjust the vectorization cost > + accordingly if satisfied. One typical example is to model shift cost for > + vector with length by counting number of required lengths under condition > + LOOP_VINFO_FULLY_WITH_LENGTH_P. */ > + > +static void > +adjust_vect_cost (rs6000_cost_data *data) > +{ Maybe call it rs6000_adjust_vect_cost? For consistency, but also it could (in the future) collide with a globalfunction of the same name (it is a very non-specific name). > + /* Each length needs one shift to fill into bits 0-7. */ > + shift_cnt += (num_vectors_m1 + 1); That doesn't need parentheses. > if (cost_data->loop_info) > - rs6000_density_test (cost_data); > + { > + adjust_vect_cost (cost_data); > + rs6000_density_test (cost_data); > + } ^^^ consistency :-) The rs6000 parts are fine for trunk, thanks! Segher