From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7888 invoked by alias); 2 Feb 2015 23:22:14 -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 7854 invoked by uid 89); 2 Feb 2015 23:22:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-we0-f179.google.com Received: from mail-we0-f179.google.com (HELO mail-we0-f179.google.com) (74.125.82.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 02 Feb 2015 23:22:11 +0000 Received: by mail-we0-f179.google.com with SMTP id q59so41920875wes.10; Mon, 02 Feb 2015 15:22:08 -0800 (PST) X-Received: by 10.181.13.115 with SMTP id ex19mr29444238wid.31.1422919328027; Mon, 02 Feb 2015 15:22:08 -0800 (PST) Received: from s42.loc (91-119-229-249.dynamic.xdsl-line.inode.at. [91.119.229.249]) by mx.google.com with ESMTPSA id hv5sm29922745wjb.16.2015.02.02.15.22.06 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 15:22:06 -0800 (PST) Received: from cow by s42.loc with local (Exim 4.80) (envelope-from ) id 1YIQJh-0007nq-PV; Tue, 03 Feb 2015 00:22:05 +0100 From: Bernhard Reutner-Fischer To: Mike Stump Cc: Bernhard Reutner-Fischer , gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH, RFC] fortran [was Re: #pragma GCC unroll support] Date: Mon, 02 Feb 2015 23:22:00 -0000 Message-Id: <1422919324-29964-1-git-send-email-rep.dot.nop@gmail.com> In-Reply-To: <23C2D250-F856-48E2-A460-1FC4674A60FB@comcast.net> References: <23C2D250-F856-48E2-A460-1FC4674A60FB@comcast.net> X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00013.txt.bz2 Hi, Some compilers IIRC use !DIR$ unroll, if memory serves me right then the DEC compiler had !DEC$ unroll. We could support one or the other three-letter keyword or maybe not. I think a combination of unroll and ivdep directives is allowed (at least in some compilers); TODO. Not sure what other statements should be annotated with that directive? I do not like the global variable directive_unroll but is was the easy way out for cheap warnings. Untested draft patch, regstrap running over night, depends on Mike's unroll-5.diffs.txt patch in this thread ( https://gcc.gnu.org/ml/gcc-patches/2015-01/msg02733.html ). Just stage-1 tinkering here. Cheers, Bernhard Reutner-Fischer (1): fortran: !GCC$ unroll for DO gcc/fortran/decl.c | 38 ++++++++++++++++++++ gcc/fortran/gfortran.h | 2 ++ gcc/fortran/match.h | 1 + gcc/fortran/parse.c | 13 ++++++- gcc/fortran/trans-decl.c | 7 ++++ gcc/fortran/trans-stmt.c | 14 ++++++++ gcc/fortran/trans.h | 3 ++ gcc/testsuite/gfortran.dg/directive_unroll_1.f90 | 46 ++++++++++++++++++++++++ gcc/testsuite/gfortran.dg/directive_unroll_2.f90 | 39 ++++++++++++++++++++ 9 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/directive_unroll_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/directive_unroll_2.f90 -- 2.1.4