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 8D54D3842433 for ; Thu, 27 Aug 2020 20:40:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8D54D3842433 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 07RKelgD006096; Thu, 27 Aug 2020 15:40:47 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 07RKehXj006094; Thu, 27 Aug 2020 15:40:43 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 27 Aug 2020 15:40:43 -0500 From: Segher Boessenkool To: Jojo R Cc: ro@CeBiTec.Uni-Bielefeld.DE, richard.guenther@gmail.com, joseph@codesourcery.com, gcc-patches@gcc.gnu.org, yunhai.syh@alibaba-inc.com Subject: Re: [PATCH v5] genemit.c (main): split insn-emit.c for compiling parallelly Message-ID: <20200827204043.GB28786@gate.crashing.org> References: <20200827124719.26471-1-jiejie_rong@c-sky.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200827124719.26471-1-jiejie_rong@c-sky.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, 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: Thu, 27 Aug 2020 20:41:00 -0000 Hi! On Thu, Aug 27, 2020 at 08:47:19PM +0800, Jojo R wrote: > +insn-emit-split-c = $(foreach o, $(shell for i in {1..$(insn-generated-split-num)}; do echo $$i; done), insn-emit$(o).c) If you use a variable for the result of that "seq", this will be more readable / maintainable / etc. (Should this use := instead of = ? What about the assignment to insn-generated-split-num itself?) > + long long read_count = 0; We use "int" in many other places for similar counts. 2**31 should be enough for anybody. > md_rtx_info info; > while (read_md_rtx (&info)) > + { > + if (!(read_count++ % 10000)) Wrong indent. "== 0" is more typical for testing if numbers are zero. > + { > + printf ("/* Split file into separate compilation units for parallel compilation %lld */\n\n", read_count); Please split this (at least the source line, but probably the target line is too long a well). All that are details. This does look like it fixes the problems in the previous versions. Thanks! Segher