From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99841 invoked by alias); 6 Dec 2017 09:21:21 -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 99818 invoked by uid 89); 6 Dec 2017 09:21:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-9.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_BRBL_LASTEXT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=standardized X-Spam-User: qpsmtpd, 2 recipients X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Dec 2017 09:21:19 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id B017781C18; Wed, 6 Dec 2017 10:21:16 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X_M5-N8kQ7-n; Wed, 6 Dec 2017 10:21:16 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 717E182266; Wed, 6 Dec 2017 10:21:16 +0100 (CET) From: Eric Botcazou To: sgk@troutmask.apl.washington.edu Cc: gcc-patches@gcc.gnu.org, gfortran Subject: Re: [fortran] Add support for #pragma GCC unroll v3 Date: Wed, 06 Dec 2017 09:21:00 -0000 Message-ID: <3974132.UbLS4EJLdD@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-53-desktop; KDE/4.14.9; x86_64; ; ) In-Reply-To: <20171125173149.GB40985@troutmask.apl.washington.edu> References: <1957613.VqFDUkVbj2@polaris> <20171125173149.GB40985@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart4626011.eefXIDS050" Content-Transfer-Encoding: 7Bit X-SW-Source: 2017-12/txt/msg00299.txt.bz2 This is a multi-part message in MIME format. --nextPart4626011.eefXIDS050 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Content-length: 445 > 6.1 Extensions implemented in GNU Fortran > 7.2 GNU Fortran Compiler Directives > > 6.1 describes extension covering legacy code and vendor extensions. > 7.2 describes other !$GCC directives. Currently, the section is > mainly calling conventions (CDECL, STDCALL, etc) and library > macroc (DLLEXPORT). These should probably be in 7.2.1 and the > UNROLL directive in 7.2.2. Attached is a minimal patch along these lines. -- Eric Botcazou --nextPart4626011.eefXIDS050 Content-Disposition: attachment; filename="p.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="p.diff" Content-length: 1285 Index: fortran/gfortran.texi =================================================================== --- fortran/gfortran.texi (revision 255437) +++ fortran/gfortran.texi (working copy) @@ -3423,6 +3423,14 @@ as this requires the new array descripto @node GNU Fortran Compiler Directives @section GNU Fortran Compiler Directives +@menu +* ATTRIBUTES directive:: +* UNROLL directive:: +@end menu + +@node ATTRIBUTES directive +@subsection ATTRIBUTES directive + The Fortran standard describes how a conforming program shall behave; however, the exact implementation is not standardized. In order to allow the user to choose specific implementation details, compiler @@ -3496,6 +3504,19 @@ of the procedure; for variables and proc the same declaration part as the variable or procedure pointer. +@node UNROLL directive +@subsection UNROLL directive + +The syntax of the directive is + +@code{!GCC$ unroll N} + +You can use this directive to control how many times a loop should be unrolled. +It must be placed immediately before a @code{DO} loop and applies only to the +loop that follows. N is an integer constant specifying the unrolling factor. +The values of 0 and 1 block any unrolling of the loop. + + @node Non-Fortran Main Program @section Non-Fortran Main Program --nextPart4626011.eefXIDS050--