On 17 November 2017 14:31:45 CET, Richard Biener <richard.guent...@gmail.com> 
wrote:
>On Fri, Nov 17, 2017 at 11:23 AM, Eric Botcazou <ebotca...@adacore.com>
>wrote:
>> Hi,
>>
>> this is a cleaned up and updated revision of Mike's latest posted
>patch
>> implementing #pragma GCC unroll in the C and C++ compilers.  To be
>honest,
>> we're not so much interested in the front-end bits as in the
>middle-end bits,
>> because the latter would at last make the Ada version of the pragma
>work, but
>> the front-end bits are a significant part of the whole thing so it's
>probably
>> fair to rescue them as well.
>>
>> The C and C++ front-end bits are (almost) verbatim from Mike.  The
>cleanup
>> comprises making the new 3rd operand of ANNOTATE_EXPR mandatory, so
>that you
>> don't have to add guards all over the place, polishing a few rough
>edges and
>> eliminating a few preexisting nits in the unrolling code.
>>
>> Tested on x86_64-suse-linux, OK for the mainline?
>
>Looking at the middle-end changes.  The change to ANNOTATE_EXPR to
>three
>operands is approved also for existing frontends (just in case you
>don't get review).
>Found the missing possibility of an argument limiting myself...
>
>Your changes to the RTL unrolling pass as far as I see enable the
>optimization
>in its general form for all loops in a function if cfun->has_unroll,
>not just for
>the marked loops.  I think that is unintended?
>
>I think you want to change copy_loop_info () to copy the flag as well.
>
>@@ -1566,7 +1593,7 @@ public:
>   {}
>
>   /* opt_pass methods: */
>-  virtual bool gate (function *) { return optimize >= 2; }
>+  virtual bool gate (function *) { return optimize >= 2 ||
>cfun->has_unroll; }
>   virtual unsigned int execute (function *);
>
> }; // class pass_complete_unrolli
>
>I think this has the same issue as the RTL unroller change.
>
>Otherwise the middle-end changes look ok.

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

TIA

Reply via email to