This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/RFA] PR/26830 part 2, delay SSA updating in loop header copying


Hi Paolo,

On Thu, 30 Mar 2006, Paolo Bonzini wrote:
> -  for (i = 1; i < loops->num; i++)
> +  for (n_copied = 0, i = 1; i < loops->num; i++)

As an aspect of programming style, I believe the GNU standards prefer
(though it might just be personal preference), that unrelated assignments
should be avoided in the intializers of a for statement.  In this case,
n_copied isn't even an induction variable, so should probably be
initialized before the loop, maybe even at the point of declaration?

> +  if (n_copied)
> +    update_ssa (TODO_update_ssa);

Given that the only use is to test whether anything was copied or
not, it might make sense to instead use a Boolean "copied_p".

Perhaps something like:

+  bool copied_p = false;
...
+      if (tree_duplicate_sese_region (..))
+	copied_p = true;
...


Let's wait for Zdenek's opinions and the results of bootstrap
and regression testing, but this change makes sense to me, if
its safe.

Thanks,

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]