This is the mail archive of the 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: [ast-optimizer-branch]: SSA-CCP on tree-ssa

On Fri, 19 Oct 2001, Daniel Berlin wrote:

> Rewrites ssa-ccp so it doesn't depend on an intermediate
> representation, by abstracting what it really wants to do into
> function pointers.
While I like the idea of sharing common code, I think we should
not mix both implementations in the same file.  How about moving
the tree-specific functions to tree-ssa-ccp.c?

When I started implementing tree-ssa, the flowgraph code also
used a bunch of function pointers to re-use the existing code.
It later turned out that the function pointers provided too much
intrusion with little benefit.

I see a lot of tiny changes to isolate IR-specific functions.  Is
this really worth it?  Have you considered a new implementation
instead?  Even if it means duplicating some code, I'm trying to
figure out which option is easier to maintain in the future.

If the common code is not really large, the added abstraction
layer with function pointers may not be a good idea.  I also
don't particularly like the idea of tossing void pointers around
(but I'm going to be posting about that in a separate thread).

> I then implemented the functions for tree-ssa.
> It doesn't remove the dead code, and has to conservatively assume phi
> nodes parms to be active when they might not be (because we don't know
> which to select for which incoming edge right now, so unless the phi
> node is defined in one of the predecessors, and we know *that* edge
> isn't executable, we can't say it's not executable).
This should be easy to fix by having PHI arguments know which
edge they are coming from.

> However, it propagates constants (anything really_constant_p
> says is constant). The evaluation routine doesn't try to see if
> array indices are variables/expressions with a constant value.
> Other than that, all should be good.
You don't mention bootstrap/regression test results. Particulary,
using -ftree-ssa.  On the branch we should make -O2 trigger the
tree SSA transformations.


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