This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][parloops] Modify parloops to allow code generation on SESE regions
Hi,
On Wed, Apr 23, 2008 at 5:35 PM, Zdenek Dvorak <rakdver@kam.mff.cuni.cz> wrote:
> Hi,
>
> > Index: gcc/dominance.c
> > ===================================================================
> > --- gcc/dominance.c (revision 134558)
> > +++ gcc/dominance.c (working copy)
> > @@ -693,6 +693,15 @@ free_dominance_info (enum cdi_direction
> > dom_computed[dir_index] = DOM_NONE;
> > }
> >
> > +/* Force the re-evaluation of the dominance information for the
> > + direction DIR. */
> > +void
> > +recalculate_dominance_info (enum cdi_direction dir)
> > +{
> > + free_dominance_info (dir);
> > + calculate_dominance_info (dir);
> > +}
> > +
>
> Why is this needed? You seem to use this only for post-dominators, and
> postdominators do not seem to be used anywhere in the code (except in
> asserts, which IMHO is not good enough reason to compute them)?
Yes, indeed. How about guarding the computation of the postdominators
and the assert with #ifdef ENABLE_CHECKING ?
Should I also hand-inline the function ?
> > +/* Return nonzero if basic block BB belongs to the SESE region between
> > + ENTRY and EXIT. */
> > +bool
> > +bb_inside_sese_region_p (basic_block entry, basic_block exit,
> > + const_basic_block bb)
> > +{
>
> this seems to be equivalent to "entry dominates bb and exit does not"?
> I.e., could be implemented using dominated_by_p, instead of cfg
> traversal?
I will replace it with :
dominated_by_p (CDI_DOMINATORS, def_bb, entry_bb)
&& dominated_by_p (CDI_POST_DOMINATORS, def_bb, exit_bb)
However, this will require the dominance info to be recalculated
beforehand (at the assert is fine).
Agreed and integrated all other suggestions.
Antoniu