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: Fix PR rtl-optimization/34035


On Nov 12, 2007 10:49 PM, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> > This is how compile time always creeps up in gcc.
>
> Figures?
>
> > Please just call delete_unreachable_blocks() instead of cleanup_cfg().
>
> I think that cleanup_cfg (0) is a good compromise in this case.

I respectfully disagree.

I appreciate you fixed this bug, first of all.  But if deleting just
the unreachable blocks is sufficient, then there is no reason that I
can think of to do a cfg cleanup.

With cleanup_cfg(0) you add another delete_trivially_dead_insns()
pass, and three iterations over all basic blocks.  This does seem, at
first, to be quite cheap.  The problem is that we do it all over the
place when it actually doesn't buy you anything: The "good" rtl passes
look through the dead code that d_t_d_i can remove, and even the
semi-good passes don't care about an extra forwarder block or a
single_succ block here and there.

IMO much of gcc's abysmal compile time performance can be blamed on
doing redundant work all over the place, trying hard for little gain.
Sorry to jump on your patch like this, but it just looks like
"obvious" redundant cfg cleanup work  (bikeshed, bikeshed! ;-)

But, many thanks for fixing the bug, at least! :-)

Gr.
Steven


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