This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lno] tree-ssa merge
- From: Dorit Naishlos <DORIT at il dot ibm dot com>
- To: Pop Sebastian <pop at gauvain dot u-strasbg dot fr>
- Cc: gcc-patches at gcc dot gnu dot org, Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Date: Mon, 26 Jan 2004 15:09:26 +0200
- Subject: Re: [lno] tree-ssa merge
> Yes, I'm working on making the analyzer work again correctly. The
> changes brought in code that is equivalent of the loop header copy:
> instead of having the exit condition of a loop at the top of the loop,
> ....
> ....
> Based on the fact that the loop count is computed using the exit
> expression, the nb_iterations is thus sometimes one iteration less
> than the true number of iterations. In fact, at the moment, the
> nb_iterations is the number of times the exit condition has to be
> evaluated at runtime before exiting the loop. I'm working on a fix.
Thanks for the detailed explanation Sebastian - I have also fixed the
loop-bound transformation in the vectorizer accordingly. I'll send a patch
soon.
dorit
Pop Sebastian
<pop@gauvain.u-st To: Dorit Naishlos/Haifa/IBM@IBMIL
rasbg.fr> cc: gcc-patches@gcc.gnu.org, Zdenek Dvorak
<rakdver@atrey.karlin.mff.cuni.cz>
22/01/2004 16:47 Subject: Re: [lno] tree-ssa merge
On Thu, Jan 22, 2004 at 04:40:45PM +0200, Dorit Naishlos wrote:
>
> > + * tree-ssa-vect-*: Use -fdump-tree-vect instead of
> > + -fdump-tree-vect-stats.
>
> Sebastian, are you sure about this? it looks like at least for the
> vectorizer the -stats is required.
You're right, I missed the fact that -fdump-tree-vect-stats works.
This was almost an automatic change. Sorry.
> The patch below fixes that, and also
> fixes a compilation problem in one of the tests cases. (Currently the
test
Thanks.
> cases fail due to the problem raised in
> http://gcc.gnu.org/ml/gcc-patches/2004-01/msg02273.html)
>
Yes, I'm working on making the analyzer work again correctly. The
changes brought in code that is equivalent of the loop header copy:
instead of having the exit condition of a loop at the top of the loop,
a_0 = ...
loop
a_1 = phi (a_0, a_2)
if (a_1 op x) exit the loop
...
a_2 = ...
endloop
the LCH copies the condition out of the loop, and moves the exit of
the loop at the end of the loops body. The transformed loop looks as
follows:
a_0 = ...
if (a_1 op x) enter the loop
loop
a_1 = phi (a_0, a_2)
...
a_2 = ...
if (a_2 op x) exit the loop
endloop
endif
Based on the fact that the loop count is computed using the exit
expression, the nb_iterations is thus sometimes one iteration less
than the true number of iterations. In fact, at the moment, the
nb_iterations is the number of times the exit condition has to be
evaluated at runtime before exiting the loop. I'm working on a fix.