From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4598 invoked by alias); 3 Feb 2015 08:42:13 -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 4586 invoked by uid 89); 3 Feb 2015 08:42:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,FAKE_REPLY_C,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 X-HELO: outpost18.zedat.fu-berlin.de Received: from outpost18.zedat.fu-berlin.de (HELO outpost18.zedat.fu-berlin.de) (130.133.4.111) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 03 Feb 2015 08:42:11 +0000 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by outpost.zedat.fu-berlin.de (Exim 4.82) with esmtp (envelope-from ) id <1YIZ3d-003tUT-SS>; Tue, 03 Feb 2015 09:42:05 +0100 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.82) with esmtps (envelope-from ) id <1YIZ3d-00081T-Qi>; Tue, 03 Feb 2015 09:42:05 +0100 Received: from login1.physik.fu-berlin.de ([160.45.66.207]) by mx.physik.fu-berlin.de with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YIZ3Y-00038e-DU; Tue, 03 Feb 2015 09:42:00 +0100 Received: from tburnus by login1.physik.fu-berlin.de with local (Exim 4.80 #3 (Debian)) id 1YIZ3Y-00066w-6r; Tue, 03 Feb 2015 09:42:00 +0100 Date: Tue, 03 Feb 2015 08:42:00 -0000 From: Tobias Burnus To: Bernhard Reutner-Fischer , Mike Stump Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: Re: [PATCH, v0] fortran: !GCC$ unroll for DO Message-ID: <20150203084159.GA18420@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422919324-29964-2-git-send-email-rep.dot.nop@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-02/txt/msg00016.txt.bz2 Bernhard Reutner-Fischer wrote: > 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. Intel's compiler supports quite a lot of loop directives. (Its Fortran front end is based on DEC's and part of the developer team also moved from Compaq to Intel. Not that Intel didn't add a bunch of additional directives later on.) Supported are: simd, ivdep, loop count, (no)vector, inline, force, (no)inline, (no)unroll, unroll_and_jam, nofusion and distribution point. GCC support "ivdep" (C/C++), simd (I think only via -fcilkplus; but OpenMP's 'omp simd' is a replacement [-fopenmp/-fopenmp-simd] in C/C++ and Fortran) - and "unroll" as proposed for C/C++ and with this patch for Fortran. By the way: gfortran automatically annotates 'do concurrent' with 'ivdep'. For Intel's loop directives, see: https://software.intel.com/en-us/articles/getting-started-with-intel-composer-xe-2013-compiler-pragmas-and-directives C++: https://software.intel.com/en-us/node/524494 Fortran: https://software.intel.com/en-us/node/525781 * * * Regarding the patch: In general, I prefer to stick to standard methods (which are portable) and think that those user knobs often make things slower than faster (as they tend to stay for years, even after the hard- ware as moved on - or they are even inserted blindly). till, I think it would be fine to add it. Tobias PS: For a non-RFC patch, you also need to update gfortran.texi.