On 4/5/12 9:54 AM, Richard Guenther wrote:
Honza, does this look ok? I am going to continue this way
until I can re-architect the toplevel pass structure in a way
that we hand control more to the pass manager. Well, hopefully ;)
Related to this, have you thought about the handoff points between front
ends and the middle end?
In LTO (and at some point in the gimple front end branch) we have all
this code setting up various tidbits like:
- Creating cgraph nodes.
- Creating FUNCTION_DECLs
- Setting their gimple bodies
It would be nice if front ends had a single handoff point into the
So, for instance, if the FE only needed to call cgraph_create_node() or
varpool_node() to register new functions and globals.
After doing all that registration, the FE calls cgraph_optimize() (or
some other unique entry point).
I *think* this is roughly how things work, but there seem to be various
other cgraph/middle-end calls made from front ends.