From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id 26B683858D28 for ; Mon, 30 Oct 2023 21:11:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 26B683858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 26B683858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698700307; cv=none; b=QZsvyFVNoKSl2FCd3GLLiC/2Xv0M3sKNlOPslsCpJMcmSFJe8Nj1qlwMtS6wv0+HI2hx4IjDQvsfz6lNSJqgtzkyuvaCKxOxeWPeCNYPQQdpiVq6Q+bKMoWVyr8lbvWcCr4Huuyw6kNY/8+2FOj8QWyMwDr8l5mAYimgyiCIjlw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698700307; c=relaxed/simple; bh=0Yq+HgNvWd1yrmTh8iUvEvSrdtjObq1JVflCc2clpA0=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=TIGTn90iY2K9yqAUF7rCup/d68rbs/K8MDaPZddUKtMeWdY/OFan7RdC34urkrTRAVKqXbfqQ1A4hru34keOU3KUbJ0NZqbpWjBQIaG4RRumvajw7WX0ZzmTrOMEhMIpMTNunPET3U/byaXELEjXgAnUiX8jCzOvwpMJDbGfaN4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-280208d0679so1876229a91.3 for ; Mon, 30 Oct 2023 14:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698700305; x=1699305105; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=G1M95U96KrSGHpkVOFkPlZBjSVZcF2v5QAU/f6dt5P8=; b=it/1rshEOUwxaCsLuCEplqyAZY/rVbPZBI7qXR69BdxKJLj/TrMskbvzPlQEmKZedX eaRgHcHDTgW3+sNewkQDcGtoxzb0lEjvT6r2IoNROKeMBxnu4RI0xuPUc56gTulqhj2s yExus+GIIewhgmqSeLApPosiRbo67ijs0G0qMVKvuojVcCNJnilx2UkEsiudfl2vkElh RW7ffrhylSPQxtPV4GLi7BjVCSrb6lEO4F9GMHeYAvBepXVvJTFDG3HpiY1Cpxzf9Eph LdgKop8fyKQCK2chtHCSC7UEpfvWsoQNHiXKPkF/o3J2313HiiicjCYhmrxryWo6LDPj KL2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698700305; x=1699305105; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=G1M95U96KrSGHpkVOFkPlZBjSVZcF2v5QAU/f6dt5P8=; b=iH5wncdr2+XBiLI1HSjKidIAP0ts59sbT40dLcCMYNAgTKHIZUF7KB850b1y7pDE3v ibzlKxbr97XvEqBow5f3nIfHTgrc2hQH/tEZ/2RV5EVWwRvMLf3rJcdFxcdRNrKNDQcy X56i5jLqDT/T6vhLA+oGevkwHzoZrxcFoYdhYD9D/1QC4dWbQBm/M+TynUvEKQ9buX+f LKOyDKeULxcm5b8CL0ET+tqhnWxk1SLkA89/XFVUVAYaYweFuZEE9RjoBwZ/otSu51na vUNhHwLwh+X5lhGQzz9etROF3vzuULczdlpLmb7qhQRdzHltCHdxCU+T6w8tUjE3B38i ODFg== X-Gm-Message-State: AOJu0Yy7cB/tgHvZjg+/WeLWHGsUEeW0hp6ok65UPm4tQri448LWFtRl oR/2DedoAICpYR3McVigYN8= X-Google-Smtp-Source: AGHT+IEUsutjZeXbtMfl3BkH5nskcQTNibgiG4pODoJMi26fGjTjmibGJMYJb8iHSCoLtlCtTy5qpA== X-Received: by 2002:a17:90a:5c:b0:27e:3b1c:4f03 with SMTP id 28-20020a17090a005c00b0027e3b1c4f03mr7942748pjb.38.1698700304990; Mon, 30 Oct 2023 14:11:44 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id d88-20020a17090a6f6100b0027e022bd3e5sm6368828pjk.54.2023.10.30.14.11.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Oct 2023 14:11:44 -0700 (PDT) Message-ID: <17652a21-33d4-4a43-8394-dac1f9d89855@gmail.com> Date: Mon, 30 Oct 2023 15:11:38 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] genemit: Split insn-emit.cc into ten files. Content-Language: en-US To: Robin Dapp , gcc-patches Cc: Tamar Christina , "rjiejie@linux.alibaba.com" , Sam James References: <37f1c7f7-411e-46de-8d68-a1e21ff440ae@gmail.com> <0867077f-12ac-4a89-8745-440cc782fe5b@gmail.com> <87wmvliy40.fsf@gentoo.org> <04d13878-06c0-43a5-add7-a186806ba2fc@gmail.com> From: Jeff Law In-Reply-To: <04d13878-06c0-43a5-add7-a186806ba2fc@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/27/23 13:04, Robin Dapp wrote: > After working with Sam off-list (thanks) I managed to get hppa to > build. Initially it looked as if hppa just had a very small number of > instruction patterns so we wouldn't generate all 10 output files. > However, the actual issue (which we will only hit with a low > pattern count) was with counting all the patterns vs only counting > the patterns that will be output. A wrong pattern count lead to > prematurely stopping to write output files. > > With that corrected, hppa "just works" until I hit linker errors > due to relocations - most likely unrelated: > > bin/ld: unwind-dw2-fde-dip_s.o(.data.rel.ro+0): cannot handle > R_PARISC_FPTR64 for __pthread_key_create@@GLIBC_2.34 > > Attached is v3 that has been bootstrapped and tested on x86 and power10, > aarch64 bootstrap was ok, testsuite is still running. A riscv build and > testsuite run was successful as well. > > Regards > Robin > > From 248744c328440bff9cc339d2bf622852cbaac343 Mon Sep 17 00:00:00 2001 > From: Robin Dapp > Date: Thu, 12 Oct 2023 11:23:26 +0200 > Subject: [PATCH v3] genemit: Split insn-emit.cc into several partitions. > > On riscv insn-emit.cc has grown to over 1.2 mio lines of code and > compiling it takes considerable time. > Therefore, this patch adjust genemit to create several partitions > (insn-emit-1.cc to insn-emit-n.cc). The available patterns are > written to the given files in a sequential fashion. > > Similar to match.pd a configure option --with-emitinsn-partitions=num > is introduced that makes the number of partition configurable. > > gcc/ChangeLog: > > PR bootstrap/84402 > PR target/111600 > > * Makefile.in: Handle split insn-emit.cc. > * configure: Regenerate. > * configure.ac: Add --with-insnemit-partitions. > * genemit.cc (output_peephole2_scratches): Print to file instead > of stdout. > (print_code): Ditto. > (gen_rtx_scratch): Ditto. > (gen_exp): Ditto. > (gen_emit_seq): Ditto. > (emit_c_code): Ditto. > (gen_insn): Ditto. > (gen_expand): Ditto. > (gen_split): Ditto. > (output_add_clobbers): Ditto. > (output_added_clobbers_hard_reg_p): Ditto. > (print_overload_arguments): Ditto. > (print_overload_test): Ditto. > (handle_overloaded_code_for): Ditto. > (handle_overloaded_gen): Ditto. > (print_header): New function. > (handle_arg): New function. > (main): Split output into 10 files. > * gensupport.cc (count_patterns): New function. > * gensupport.h (count_patterns): Define. > * read-md.cc (md_reader::print_md_ptr_loc): Add file argument. > * read-md.h (class md_reader): Change definition. Just one note on testing. I threw this into my tester which ran through its usual set of crosses as well as native emulated builds of alpha, hppa, m68k, sh4, sh4eb, riscv, aarch64. s390x and ppc64le are in progress, and have progressed beyond their build phase. Note that the emulated natives other than risc-v are 3-stage bootstrapped. OK for the trunk. Thanks for taking care of this. I guess I'll need to time a risc-v bootstrap again. It's currently using --disable-bootstrap at configure time in my tester. jeff