This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC/RFA] PR/26830 part 2, delay SSA updating in loop header copying
- From: Roger Sayle <roger at eyesopen dot com>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Mar 2006 08:10:55 -0700 (MST)
- Subject: 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
--