From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92a.google.com (mail-ua1-x92a.google.com [IPv6:2607:f8b0:4864:20::92a]) by sourceware.org (Postfix) with ESMTPS id 935DA3959C72 for ; Wed, 16 Nov 2022 10:12:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 935DA3959C72 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ua1-x92a.google.com with SMTP id d3so5904124uan.4 for ; Wed, 16 Nov 2022 02:12:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4k6cwDVHhuuiflEXMK2Wz7M/PqSmhSk8kr/7YQlz84I=; b=foEHMpYEbBi2yD58o14MSCzPVRZ1ynjLIAFqUiB6C/A7WPYtv2wtPs5UhRsg5uwL5G NM8Qt+PK4uXuVdBs8q5bBgHsC+nXUE2nY9nZzmDyBu+2I6hS/h9H4EHRKq3iDZy9MosQ iY5URe2SiTRcWYTHPG6SRTXL6c3W6vEAEV3dYhKTNFHheCtkrMhianU8i53uy/CSpkfd GZn/p3xohdYt33AK5SrgQJx3hBlEhwGH36ujlM+w5yv6sc77KletHO5Gfe3FqjrU5QFX JuQJMf2bA054KgJLr+Exi/0zej1jARPPTdMyxSWCcX23ErgTkeKR5QOMq9c3Kg1dhrHw MPcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=4k6cwDVHhuuiflEXMK2Wz7M/PqSmhSk8kr/7YQlz84I=; b=kMUBEMOCOBY6s76AvJg5P6FG7oar8ysPzzogTyj2ZxVSr7Q93pHUsEfXNYqiIhouMT rUNTszLRb/UBs353Ucit4VhIuIKFLrd29AMgpy9RpjyGumiMWxIu3nPtaryyoVdeD1By jWY7tx3sSnmDhiJI/qeEEpKLHxhmwJgNfMhAnPow9XVy/FniuQXUZiycIUYw16DZ4HHP vt4V4lIkwo5nRkbe8cSlqtFPZJnyuT4Wf4np0uSbFD1y+6zMT4eZrHN3DSzxF7H0JriO hc5B7UAl2q8kVnTKICJjYFy541dUWGixqvQG4qBrmtE2vSDhh+1B3DidXfHU6JC2bbGG ZiJg== X-Gm-Message-State: ANoB5pne6R+AUT5I7GJIQX3G3WmJymRnQxGllgaJibj0kVqvZ55ThgwD IllPnBlPdHJPeuCqu/8+yy8UI0F5uyjELkFTuf1etwgNvTg= X-Google-Smtp-Source: AA0mqf4co6ckngp3RJghrULTGT6Ruvmyyl4zUSP7k98x0jQymy3asP9rh7AmC7fUdUmsUUhbtT2TGB9iJKkV7Icbm8o= X-Received: by 2002:ab0:721a:0:b0:3fe:5e4:c916 with SMTP id u26-20020ab0721a000000b003fe05e4c916mr11450091uao.33.1668593553757; Wed, 16 Nov 2022 02:12:33 -0800 (PST) MIME-Version: 1.0 References: <8f4bdd1c-44f1-fb2f-fdc2-f7fcbef17c43@orange.fr> <88d8e0b3-8c75-2ccc-79bc-e9b621f0794c@netcologne.de> In-Reply-To: <88d8e0b3-8c75-2ccc-79bc-e9b621f0794c@netcologne.de> From: =?UTF-8?Q?Th=C3=A9o_Cavignac?= Date: Wed, 16 Nov 2022 11:12:11 +0100 Message-ID: Subject: Re: Optimization of spread To: gfortran 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,KAM_SHORT,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: Mikael, Thomas, Thank you very much for being so welcoming. > The source is actually more C than C++ (the fortran front-end at least). That's good to know, I am much more comfortable with C. > It requires little C++ skills, but time and willingness to decipher its c= omplexity. Yes, I don't expect that to be easy. > There are two places where inlining can be done: > * In front-end passes where the parsed fortran code is rewritten > before generating the intermediary code for the optimizers. Thomas > K=C3=B6nig can help you there. > * Directly in the code generation for the optimizers. It is (much) > more complex but can avoid the need for temporaries. I can help you ther= e. My understanding of the compiler inner working being what it is, I will try to have a look at the higher level side first. > I most certainly can. frontend-passes.cc contains, among other > functionality, a function to inline MATMUL for small sizes, so > much of the infrastructure is already there. I will start my investigation there. > > Some links about our development process and conventions: > > https://gcc.gnu.org/contribute.html > > https://gcc.gnu.org/git.html > > And, if you're into hacking gfortran, some starting pointers are at > https://gcc.gnu.org/wiki/GFortranHacking . But always free feel to ask! I am familiar with git, but I'll have to read the two other documents soon. Thanks again, hopefully you'll ear about me a little later. Best regards, Th=C3=A9o On Thu, Nov 3, 2022 at 11:04 PM Thomas Koenig wrote= : > > Hi, > > Mikael beat me to a mail saying essentially the same things by > a few minutes, so I'm just adding a few details. > > > There are two places where inlining can be done: > > * In front-end passes where the parsed fortran code is rewritten > > before generating the intermediary code for the optimizers. Thomas > > K=C3=B6nig can help you there. > > I most certainly can. frontend-passes.cc contains, among other > functionality, a function to inline MATMUL for small sizes, so > much of the infrastructure is already there. > > > * Directly in the code generation for the optimizers. It is (much) > > more complex but can avoid the need for temporaries. I can help you th= ere. > > > > Some links about our development process and conventions: > > https://gcc.gnu.org/contribute.html > > https://gcc.gnu.org/git.html > > And, if you're into hacking gfortran, some starting pointers are at > https://gcc.gnu.org/wiki/GFortranHacking . But always free feel to ask! > > Best regards > > Thomas