From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122068 invoked by alias); 20 Nov 2017 20:22:01 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 122049 invoked by uid 89); 20 Nov 2017 20:22:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_SHORT,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=sk:sgktro, D*troutmask.apl.washington.edu, D*apl.washington.edu, U*sgk X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-oi0-f46.google.com Received: from mail-oi0-f46.google.com (HELO mail-oi0-f46.google.com) (209.85.218.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Nov 2017 20:21:59 +0000 Received: by mail-oi0-f46.google.com with SMTP id f135so7028257oib.0; Mon, 20 Nov 2017 12:21:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=10m5bYMqHEM6Vkm5iHJA4eSeXz1BEym9/raf9wkAeWo=; b=fOoJ7UygRAGboNfLs+Mw+Ubo3RJmK0o0fezBKPIikFq5Qb4Zlkd6pzoRgH7saWU6UN kQMgXq7MZkD3iYH1mCeknximL2GDsshrBvYMhsoTIf7znyy3T8pMIuPeW+JKaqP4ihdF a2c0dOonLxsWQ9KKydHW4F2tfR/b91nmySdN6pMX6etvqDDzimYGWHPmR89PamZc2vtw ghQGepFZSmxVHzx3DzsDzuxO9UsKn/Bq5HuGdxOL3QQCub6pR2+JPAE/I8HvuQh4LERr gOP01zLYf8VnI9GzfOKMsnE2DPmVBBUrt79wYU3DhZUMTUX4T4KMre5kFBKjqB9CWoYC EweQ== X-Gm-Message-State: AJaThX5Fk13sluh8b2K5xvYr12ZqcpF4ppDWcosWn/1J7aI0ZIPJKztW UTSG20X1eSkvLfzunb58ihHvXgAaa7gtiiIje9s= X-Google-Smtp-Source: AGs4zMYaaGzZiXHZBdaygpO27gPxp2YKlLfzngeAMUQqRjO7r1k3GdKbGL1yuntRsp/8TWwLhVAaRSKKi0G2CynHhz0= X-Received: by 10.202.213.76 with SMTP id m73mr8568305oig.79.1511209317427; Mon, 20 Nov 2017 12:21:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.55.139 with HTTP; Mon, 20 Nov 2017 12:21:57 -0800 (PST) In-Reply-To: <20171120144501.GA2949@troutmask.apl.washington.edu> References: <3136854.5zjt3GTbhu@polaris> <585BCFAB-107C-402E-B17A-CBD0E39419F2@gmail.com> <5042915.qGEuR7vFt9@polaris> <20171120144501.GA2949@troutmask.apl.washington.edu> From: Bernhard Reutner-Fischer Date: Mon, 20 Nov 2017 20:22:00 -0000 Message-ID: Subject: Re: [patch] Add support for #pragma GCC unroll To: Steve Kargl Cc: Eric Botcazou , GCC Patches , Richard Biener , Mike Stump , gfortran Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00123.txt.bz2 On 20 November 2017 at 15:45, Steve Kargl wrote: > On Mon, Nov 20, 2017 at 12:57:47PM +0100, Bernhard Reutner-Fischer wrote: >> On 20 November 2017 at 12:26, Eric Botcazou wrote: >> >> If anybody finds the time to push the corresponding Fortran changes then I'd >> >> be grateful. I won't have time for this until end of stage 1... >> >> >> >> https://gcc.gnu.org/ml/fortran/2015-02/msg00014.html >> > >> > OK, I'm going to merge it in the main patch. >> >> [CCing fortran@] >> Thanks alot in advance! > > The URL points to a nearly 3 year old patch. I noticed > that there is no documentation of the new Fortran directive. > Section 7.2 of gfortran.info should be updated. In particular, > does '!GCC$ UNROLL 4' affect only the immediately following > DO-LOOP or all DO-LOOPs that follow the directive until another > 'GCC$ UNROLL ...' is found? How does this new directive interface > with OpenMP and OpenACC? The documentation for the directive is missing indeed. We can fix this during stage3. Currently the directive works on the whole function (see gfc_cfun_has_unroll()) and instructs the loop-optimizers to run on that function. The loop-optimizers will discover the ANNOTATE_EXPR and act accordingly. Richard B. already noted that the RTL unroller might do more than intended, see https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01468.html I expect updates to the C and C++ in this area to be reflected to Fortran too. The interaction with OpenMP and OpenACC in the Fortran FE is the same as in the other frontends, obviously. Eric's current respin of Mikes patch is here, FYI: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01452.html thanks,