This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C++-ify and simplify loop iterators
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 24 Nov 2013 05:57:15 -0800
- Subject: Re: [PATCH] C++-ify and simplify loop iterators
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LNX dot 2 dot 00 dot 1311191600070 dot 4261 at zhemvz dot fhfr dot qr> <CAMe9rOpqi2FEwu6KatwAoN-YSbRB+J00coMGhAG0e7JUY69wOQ at mail dot gmail dot com> <CAMe9rOqxqzNmzZnCEZag_Nymrw9P9MzMfBNRWBQf2ZRR7f5_tw at mail dot gmail dot com>
On Sun, Nov 24, 2013 at 5:29 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Nov 19, 2013 at 7:19 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Nov 19, 2013 at 7:01 AM, Richard Biener <rguenther@suse.de> wrote:
>>>
>>> $subject - the following turns
>>>
>>> loop_iterator li;
>>> FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST)
>>> {
>>> ...
>>> if ()
>>> FOR_EACH_LOOP_BREAK;
>>> }
>>>
>>> into
>>>
>>> FOR_EACH_LOOP (loop, LI_ONLY_INNERMOST)
>>> {
>>> ...
>>> if ()
>>> break;
>>> }
>>>
>>> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
>>>
>>> Richard.
>>>
>>> 2013-11-19 Richard Biener <rguenther@suse.de>
>>>
>>> * cfgloop.h (struct loop_iterator): C++-ify, add constructor
>>> and destructor and make fel_next a member function.
>>> (fel_next): Transform into ...
>>> (loop_iterator::next): ... this.
>>> (fel_init): Transform into ...
>>> (loop_iterator::loop_iterator): ... this.
>>> (loop_iterator::~loop_iterator): New.
>>> (FOR_EACH_LOOP): Remove loop-iterator argument.
>>> (FOR_EACH_LOOP_BREAK): Remove no longer necessary macro.
>>> * cfgloop.c, cfgloopmanip.c, config/mn10300/mn10300.c,
>>> graphite-clast-to-gimple.c, graphite-scop-detection.c,
>>> graphite-sese-to-poly.c, ipa-inline-analysis.c, ipa-pure-const.c,
>>> loop-init.c, loop-invariant.c, loop-unroll.c, loop-unswitch.c,
>>> modulo-sched.c, predict.c, sel-sched-ir.c, tree-cfg.c, tree-data-ref.c,
>>> tree-if-conv.c, tree-loop-distribution.c, tree-parloops.c,
>>> tree-predcom.c, tree-scalar-evolution.c, tree-ssa-dce.c,
>>> tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c,
>>> tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-loop-niter.c,
>>> tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c,
>>> tree-ssa-threadupdate.c, tree-vectorizer.c, tree-vrp.c: Adjust
>>> uses of FOR_EACH_LOOP and remove loop_iterator variables. Replace
>>> FOR_EACH_LOOP_BREAK with break.
>>>
>>
>> This caused:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59199
>>
>> H.J.
>
> The checkin contains:
>
> --- trunk/gcc/graphite-sese-to-poly.c 2013/11/19 15:02:27 205031
> +++ trunk/gcc/graphite-sese-to-poly.c 2013/11/19 15:19:09 205032
> @@ -56,6 +56,7 @@
> #include "domwalk.h"
> #include "sese.h"
> #include "tree-ssa-propagate.h"
> +#include "expr.h"
>
> #ifdef HAVE_cloog
> #include "expr.h"
>
> which isn't in the patch and isn't necessary. I am checking
> a patch to remove it.
>
This is the patch I checked in.
--
H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog (revision 205331)
+++ ChangeLog (working copy)
@@ -1,3 +1,7 @@
+2013-11-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * graphite-sese-to-poly.c: Don't include extra "expr.h".
+
2013-11-23 Eric Botcazou <ebotcazou@adacore.com>
* cilk-common.c (expand_builtin_cilk_detach): Dereference worker.
Index: graphite-sese-to-poly.c
===================================================================
--- graphite-sese-to-poly.c (revision 205331)
+++ graphite-sese-to-poly.c (working copy)
@@ -61,7 +61,6 @@ along with GCC; see the file COPYING3.
#include "domwalk.h"
#include "sese.h"
#include "tree-ssa-propagate.h"
-#include "expr.h"
#ifdef HAVE_cloog
#include "expr.h"