From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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 04EE33858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::431 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713440307; x=1714045107; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=I9glDIgx3ATbvxiO/RqsK63v7DAqfJ4vELo13oWlNek=; b=k8npOU0BfP0LstdROgFpd13oTWl69AQvaP/vlaaElIdV0zsFNwOUaUlludLZW3Cxmu oNQpVAnHAR4Lwwp5zX2ufI7XvMSSuzYIIDXn9eH2Zi3RVbzJ8H9nnnp9JpTDYUJRutM1 5u865nVIQ+XrIrWAgex7QEfqFSq0jrkLuvr6WiYWZaXwN/cK3dCF7h7aWUgeMD0uLvSk qvtrNr1G9zHz2lrXwOP5d6m8du1i/dW8K1lA+qcP/tLH++w5UhyTPXT1CSTbSC1+aRii fuuIL4E/TfZnI4j8bL5gFD1pP18erZqaZQUwR/cpoQ50VUf9KlzZ6e4oUaLspnJRoU/g arAw== 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> From: Janne Blomqvist 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 List-Id: 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