This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tcb] Merge PHI nodes -- 7.4% reduction of PHI nodes (Take 2)
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Kazu Hirata <kazu at cs dot umass dot edu>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>,Daniel Berlin <dberlin at dberlin dot org>
- Date: Mon, 20 Sep 2004 23:02:42 +0200
- Subject: Re: [tcb] Merge PHI nodes -- 7.4% reduction of PHI nodes (Take 2)
- References: <20040920.160556.13750922.kazu@cs.umass.edu> <1095713397.29252.78.camel@localhost.localdomain>
Hello,
> I'm trying to understand what benefits do we get from this pass. It
> doesn't seem to me like increasing the in-degree of a basic block should
> have any benefits. Yes, we get to join more basic blocks, but at the
> same time we increase the number of PHI arguments.
total number of phi arguments decreases. Number of phi nodes (each of
them having some overhead) decreases. Number of basic blocks and labels
decreases. Each of those presents some savings.
> If we are missing optimization opportunities in the threader. Then it
> looks like we should be fixing that.
Improved jump threading would indeed have exactly the same effect as
this optimization. The problem is that jump threading as I wrote it
is just too messy; I (or someone) would have to clean it up first (I
of course definitely want to do it anyway, but my schedule is sort of
overflowing just now :-( ).
> And if the pass has negative compile time effects, then I'm definitely
> not interested ;)
I suspect just increasing the indegrees of basic blocks could be the
reason for increased compile time, due to linear lookups of phi argument
for edge. This is going to disappear soon, so we should probably wait till the
edge vector stuff is in before we can judge the compile time effects of
the patch.
Zdenek