This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa]: PATCH: hookize profiling
> >We can just invent rtl_register_hooks, cfg_register_hooks that will
> >all three functions, but I don't see how much it will buy us and it
> >make it neccesary to store all three pointers in the CFG structure.
> >Also the CFG expansion code is switching the hooks back and forth so it
> >is better to not make it more expensive. (but none of these is big
> >either, so if you see some stronger argument other way, just tell :)
> The profiling hooks and cfg hooks are not really independent; things
> work if the setting don't match. So it seems to me that being able to
> them independently can only introduce bugs, not help anything. How
I am mostly concerned about the interfaces. I don't quite like the idea
of exposing something internal to profiler to cfg code.
It also save some memory if we move to the multiple cfgs existing at
once. None of these are big deals tought. Whats about ...
> about this: I put the profiling hook registration where you suggest,
> have it call the cfg hook registration. Does that work for you?
Perhaps you can just add an sanity check to the registering function
ensuring that the cfghooks are set the right way.
That would ensure that hooks are right and calling tree pass with RTL
hooks or RTL pass with SSA hooks is crazy idea anyway.