[tree-ssa]: PATCH: hookize profiling

Jan Hubicka jh@suse.cz
Thu Feb 12 19:15:00 GMT 2004


> >We can just invent rtl_register_hooks, cfg_register_hooks that will 
> >call
> >all three functions, but I don't see how much it will buy us and it 
> >will
> >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 
> >deal
> >either, so if you see some stronger argument other way, just tell :)
> 
> The profiling hooks and cfg hooks are not really independent; things 
> don't
> work if the setting don't match.  So it seems to me that being able to 
> set
> 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, 
> and
> 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.

Honza



More information about the Gcc-patches mailing list