From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 08EEA3858C52; Thu, 18 Apr 2024 11:38:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 08EEA3858C52 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 08EEA3858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713440310; cv=none; b=xUvY16UYFG3I8pKsEJd8cZUer4NKL1Uf5FstsSMl9GMTICARGb4i1psP/4ktrYaZqjLpyhLPA3n4SKKZKGMwEf/KPlnq2JU4RWV2YMdLH2nmYSpjXdu0i/2VKAqFPgzSiLtYdROY/Hs3MXq3XGRWtRUqDULsekb6OmduywC7C6g= 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=j5B80gbv83tbSAXX6eYtKiT0jUVcdqKmlOJqp7LLhOJgFjN7z+IF+gRTF98WMSm5lKAfVLEAa6EO8C+E1uGeHW6FatXkzUSH0HqN3yxjZCuvYONM/wqqr/GB66mFS63quNUVvlPafzk0R7Jzl8d5RXAAGmw2Ur7NAPCcVlYKwhw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-418c0d83e61so8197465e9.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=gcc.gnu.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=BA0qfpqjTQ7JCDC93TdMl5J6/FLutMqHwN0ifaGLWm++fh22JVj3mVet7cqnTo7SYH 99IWqnGSWDAmdXuj/IVDWf1qHMU5AocDq6PL+8rOytv0PbJInw2e2CBMcd4g2BPMMsty /JRIUgxj4qPPcQfu73CvE5litt3AffTF2RhTyVbJTGoCzdlurHhJ1bXzHfGbXH4U6mat Rvd7I4U6wRr+vAIDjlhTqTeI7viui8wiKkf3Rj32bMLyszhWcwLsajaJ0eP2T2Db3nyp BuTlFVO+0h4Ps6TSXqhTv9ZmzgxcnGdkyB7ZFkCz4GV0K7gK0oEdo4q8wE4z+P3FWGFK Gg+w== 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=a2LJGJ5KPIkO+/bfN4gJi6H4q8nAknhG8Qysf7thmjTSKQHxM3L+aHKUOIZjV35i0u l90sQd7OOKHCmfzbBr0k8FiuYcwqqhs14FLm8Vwb0zSL+78CijS1jKcerkyZV3ypja6E bkhWHn6a6Wtr0RyZ4XmPiX5YCqLQSntpkb7IBJ4RS5y0AzQa5g/6rMS00WjkjMvaZY5h tzR0OFyTupWM6CKGy1pRuTydLXcqd0W+3lhBsPGWePgT84gIlNO+3XZ0gNkCMbCqsD+X zcok8SqKw8XU/lXTabTIAaBW6Xb5cCJcX5+VPmBFBrD3GXXU1nGnrTmBK7zewOzAEzcG olTA== X-Forwarded-Encrypted: i=1; AJvYcCUKqZbcjSgIiOVsCIpdVNBu4mcdrLJFb+oPtg0txN3TimqDxdJwIuSGpwpP2lnnys/2/cnXeRFqcrVaolwGJ+3DZkCU8+J9CQ8uGIpP7CMf/qFllo4= X-Gm-Message-State: AOJu0Yw6jxRmewIJjtHGl39kbbwiTXuZHzud17qHXXNgEvcHD3S9zL6s STz8x27RpC+Qo8gTGT2boPmqejTOkx+O+HErV8R6A7/bRmDATEXZ2XBq2H63pDURtFg3sfqrXo+ 9fllxlxe9rIuG8s1K6spxQH3gakoycw== 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.8 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