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: [tree-ssa]: PATCH: hookize profiling



On Feb 12, 2004, at 10:53 AM, Jan Hubicka wrote:


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.

That sounds reasonable. OK, here is a revised version. I haven't fixed the
ChangeLog entry yet but I think this has everything else.


Attachment: diffs2.txt
Description: Text document

Attachment: tree-profile.c
Description: Text document

Attachment: rtl-profile.c
Description: Text document



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