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: Preliminary patch for PR23820 and PR24309


On 10/12/07, Zdenek Dvorak <rakdver@kam.mff.cuni.cz> wrote:
> yes, these blocks cannot be removed as long as we keep the loops in
> the shape when latch has just one successor.  They are removed once
> we no longer update the loops.  I am not sure, do you suggest that
> we should not do this, or why are you asking?

No.  I was just looking for a pass that would allowed me to clean the
CFG in such a way that I can then count the number of BBs per loop for
determining whether it is a perfect nest or not.

> Certainly, the
> presence of the empty latch block does not make the analysis in ltrans
> any harder (not any simpler, of course).
>

True, I could look at the number of useful statements per block.

> > two checks, the second cond_expr is redundant.  VRP or a constant
> > propagator could be adapted to optimize this kind of double checking.
>
> Both VRP and DOM should be able to eliminate such a condition, already.
>

True, if I'm dumping the value ranges that VRP ends with, we have

N.0_28: [1, +INF]  EQUIVALENCES: { N.0_8 } (1 elements)

that is enough to deduce that "if (N != 0)" is true.  I'm looking into
why VRP doesn't trigger the elimination of the condition.

Sebastian


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