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: [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.


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