From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wI/xDnAGIWaKnzMAWB0awg (envelope-from ) for ; Thu, 18 Apr 2024 07:39:28 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Tym0itYs; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 372331E0C0; Thu, 18 Apr 2024 07:39:28 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 256F41E092 for ; Thu, 18 Apr 2024 07:39:26 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B8D9F3858C35 for ; Thu, 18 Apr 2024 11:39:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8D9F3858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713440365; bh=I9glDIgx3ATbvxiO/RqsK63v7DAqfJ4vELo13oWlNek=; h=References:In-Reply-To:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Tym0itYsLo6T6sb5EGuL9rZstBYrUp4pOuYcwt6esy4cygHR/kH5kHukvnSHl9z9m kMVqmO1o69/EkqfAmSRCk63XCOBPw/BGr9eo4hX4xEaiDCP4vljnUPj9lhFokr1ynB Tjy6dcbA/3+H6fCjcEy5QznRjzL5et0ShQ1pB+Zw= Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 04EE33858D3C; Thu, 18 Apr 2024 11:38:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 04EE33858D3C ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 04EE33858D3C ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713440310; cv=none; b=TeBMji7b66n7G/QsG6tdnwJ3+itlgrLsRr7K4I8x+dubeAqGYUwIHB6cmCg5qb4JqzdXybqOqyWKHAMoAphjPwP0cdL3uYLOamblyO6EbkGq2dgv8lPfsBk9VaPZFsbdQm7z/JVwg9H6xKlafh2YqoEOhFHCu9WOaYPPM77qV7M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713440310; c=relaxed/simple; bh=fkWgNBowUtMcL+5/Qx4U5hFHJ2M/upxCTh66dekcjSw=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=WXkj/IgzHixx3joZOROPNlKFoWaLXFyPVRNQ9Ed/jSOpzWrYD4mGFMagNAzj6E7GSuyny/8pR12QJK3LsyPanLat+jgCflU6yXVPCqIbiPAYtTiDnvA54GgYdKzoePwU3As4fccss92N/lGDClogOV8gAU4Yty7Kjfl8ZCLGrk8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-349c5732fd1so598075f8f.3; Thu, 18 Apr 2024 04:38:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713440307; x=1714045107; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I9glDIgx3ATbvxiO/RqsK63v7DAqfJ4vELo13oWlNek=; b=tdypZTOPM6DIiPUHHA/AAXSWy/V0heTWqPmsqCjbl+sm9+BdojNBYZziwEkWkxoAJD 2xo4VQ5/ur/T4M8K0AvlopugH8EBDfnyhzOg+vgWVs7vSS7Bs6oNJXHPLQBtGDksEZQW JgexV34EH9YAgSHLdrNDsFVxTPHNbQWKefaALY3Mmf0boMht3iw6oa2VnPcZqpIk6XpN rSrlFy5GO1TyfiP7g3GkTOR0TKY2WFZ5GR8LiXmKmtTysUPH6GhsKYnmUe2qOix3g9eo q4xb+9C+s57A5nXM9gwSyu9qTo/fe2DxNmUI2TqY7hjYS+8NdSH9v0M29Hn7HDqL/FMQ hBgg== X-Forwarded-Encrypted: i=1; AJvYcCXLkXVxEM6sTwCykfIgg8kP8FIXOiMx6vewsCkA86IY/0nRG07WQ3Gfo5KKBxRnM/aPlp90BcjhDbJuV7WZmXeFqFNSs2p3fsj2pW7gfYLTwhQncyPF0iaUPsRN56bEJWnkw+EEEBbd0DWO6nr41wucD8P3bJg4GKKpwQFx+UmsXiQ9VeNw48Zm3+iRKXybVO8= X-Gm-Message-State: AOJu0YywBieFE3/eBfhy9ruCZjtpOWiVV6HWyKDrI84A6ncfpeywz8tR 77UuyxSaothe5C3U7sX6EB0hdyv3AWVztNhbGq/AcbbgtTktq8Zo9enHl35ezdsherpIpL8MTak bOXr6qn2cGlD7OKBfmXSFXpJ+pi8= X-Google-Smtp-Source: AGHT+IGG3GM5P949gIR5bKpwh9H1CC85BLTJn1iaHK5QXrKmW3z9Jlweh778Qw4lB0AVQD24K+PuB1EuFqliYKcPiYo= X-Received: by 2002:a5d:640c:0:b0:345:663f:cd79 with SMTP id z12-20020a5d640c000000b00345663fcd79mr1977911wru.14.1713440306454; Thu, 18 Apr 2024 04:38:26 -0700 (PDT) MIME-Version: 1.0 References: <20240417232725.GC25080@gnu.wildebeest.org> <5bde614c-224f-4ec6-8450-7c0911938cf9@netcologne.de> <4353C519-D023-45B0-A254-C7274B7CFC6F@gmail.com> In-Reply-To: <4353C519-D023-45B0-A254-C7274B7CFC6F@gmail.com> Date: Thu, 18 Apr 2024 14:38:15 +0300 Message-ID: Subject: Re: Updated Sourceware infrastructure plans To: FX Coudert Cc: Thomas Koenig , Mark Wielaard , overseers@sourceware.org, gcc@gcc.gnu.org, binutils@sourceware.org, gdb@sourceware.org, libc-alpha@sourceware.org, "fortran@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.3 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 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Janne Blomqvist via Gdb Reply-To: Janne Blomqvist Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Thu, Apr 18, 2024 at 11:15=E2=80=AFAM FX Coudert w= rote: > > > I regenerate auto* files from time to time for libgfortran. Regeneratin= g > > them has always been very fragile (using --enable-maintainer-mode), > > and difficult to get right. > > I have never found them difficult to regenerate, but if you have only a n= on maintainer build, it is a pain to have to make a new maintainer build fo= r a minor change. > > Moreover, our m4 code is particularly painful to use and unreadable. I ha= ve been wondering for some time: should we switch to simpler Python scripts= ? It would also mean that we would have fewer files in the generated/ folde= r: right now, every time we add new combinations of types, we have a combin= atorial explosion of files. > > $ ls generated/sum_* > generated/sum_c10.c generated/sum_c17.c generated/sum_c8.c generated/sum= _i16.c generated/sum_i4.c generated/sum_r10.c generated/sum_r17.c generate= d/sum_r8.c > generated/sum_c16.c generated/sum_c4.c generated/sum_i1.c generated/sum= _i2.c generated/sum_i8.c generated/sum_r16.c generated/sum_r4.c > > We could imagine having a single file for all sum intrinsics. > > How do Fortran maintainers feel about that? For the time being I'm not an active maintainer, so my opinion doesn't per se have weight, but back when I was active I did think about this issue. IMHO the best of my ideas was to convert these into C++ templates. What we're essentially doing with the M4 stuff and the proposed in-house Python reimplementation is to make up for lack of monomorphization in plain old C. Rather than doing some DIY templates, switch the implementation language to something which has that feature built-in, in this case C++. No need to convert the entire libgfortran to C++ if you don't want to, just those objects that are generated from the M4 templates. Something like template void matmul(T* a, T* b, T* c, ...) { // actual matmul code here } extern "C" { // Instantiate template for every type and export the symbol void matmul_r4(gfc_array_r4* a, gfc_array_r4* b, gfc_array_r4* c, ...) { matmul(a, b, c, ...); } // And so on for other types } --=20 Janne Blomqvist