From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17875 invoked by alias); 11 Nov 2019 22:42:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 17856 invoked by uid 89); 11 Nov 2019 22:42:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=aid X-HELO: mail-yw1-f45.google.com Received: from mail-yw1-f45.google.com (HELO mail-yw1-f45.google.com) (209.85.161.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Nov 2019 22:42:08 +0000 Received: by mail-yw1-f45.google.com with SMTP id v84so5767113ywc.4; Mon, 11 Nov 2019 14:42:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=bgLWrQmK7SwNkZDHYQkj0WmRINGh7m4MhupqcWdFcBE=; b=mkubgUCLlSe91OY0gjOcT4pWQnKHjqqbYi3lnjHGYdF0r9aLTdVtBfHXN+hmmc9b43 uHtUQQRr/uh67029xGK50+mMmJhxhOOLJzj1FvuZRCxzKBQ2nTi5GAczDY5rafBomW7L eLEOVh2XPRBD81+RbO3FqvV+eUdb//rkR/4S5rIXR1dEnsPAAzA87Umhw20yk8ZQPMHe p8wrnkNAOF0NvVTD1xVIISUAq+t8u5CGfmRWa1kT5aeA/JKKVA1wNNZ8ZQ8okE8WN2WC T9SBlkmEuigriBOCojA9UNhZlx9Q0QI2rmlqeHKR89+1GGLN+PwnXCVx/rNi0AoVgAH9 b8Rw== MIME-Version: 1.0 References: <48286910-ebbb-10e4-488b-8c96e505375c@tkoenig.net> In-Reply-To: <48286910-ebbb-10e4-488b-8c96e505375c@tkoenig.net> From: Janne Blomqvist Date: Mon, 11 Nov 2019 22:53:00 -0000 Message-ID: Subject: Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures To: =?UTF-8?Q?Thomas_K=C3=B6nig?= Cc: "fortran@gcc.gnu.org" , gcc-patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-11/txt/msg00802.txt.bz2 On Mon, Nov 11, 2019 at 11:56 PM Thomas K=C3=B6nig wrote: > > Hello world, > > the attached patch loads scalar INTENT(IN) variables to a local > variable at the start of a procedure, as suggested in PR 67202, in > order to aid optimization. This is controlled by front-end > optimization so it is easier to catch if any bugs should turn up :-) > > This is done to make optimization by the middle-end easier. > > I left in the parts for debugging that I added for this patch. > Seeing the difference between EXEC_INIT_ASSIGN and EXEC_ASSIGN was > particularly instructive. > > Regression-tested. OK for trunk? Wouldn't it be even better to pass scalar intent(in) variables by value? The obvious objection of course is ABI, but for procedures with an explicit interface we're not following any particular ABI anyways? --=20 Janne Blomqvist