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 DC7D53858018 for ; Wed, 3 Nov 2021 01:16:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DC7D53858018 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=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 1A31FLdl026289; Tue, 2 Nov 2021 20:15:21 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 1A31FLDc026286; Tue, 2 Nov 2021 20:15:21 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 2 Nov 2021 20:15:21 -0500 From: Segher Boessenkool To: Bill Schmidt Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Subject: Re: [PATCH 08/18] rs6000: Builtin expansion, part 3 Message-ID: <20211103011520.GF614@gate.crashing.org> References: 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=-3.2 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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: Wed, 03 Nov 2021 01:16:24 -0000 On Wed, Sep 01, 2021 at 11:13:44AM -0500, Bill Schmidt wrote: > * config/rs6000/rs6000-call.c (new_cpu_expand_builtin): > Implement. (just one line) > @@ -14646,6 +14646,108 @@ static rtx > new_cpu_expand_builtin (enum rs6000_gen_builtins fcode, > tree exp ATTRIBUTE_UNUSED, rtx target) > { > + /* __builtin_cpu_init () is a nop, so expand to nothing. */ > + if (fcode == RS6000_BIF_CPU_INIT) > + return const0_rtx; > + > + if (target == 0 || GET_MODE (target) != SImode) > + target = gen_reg_rtx (SImode); > + > +#ifdef TARGET_LIBC_PROVIDES_HWCAP_IN_TCB It would make sense to put this #ifdef in a separate function (it certainly is big enough for that, that is reason enough ;-) ), and then you can probably do it without #ifdef more easily as a bonus. That's a future improvement of course. In general, any function that is unwieldily big should have pieces factored out. A good time to do that is if you would be touching it anyway (as a separate patch, before the other stuff most likely). The patch is okay for trunk (w/ the changelog nit fixed :-) ) Thanks! Segher