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: [tcb] Merge PHI nodes -- 7.4% reduction of PHI nodes (Take 2)


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


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