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 11, 2004, at 3:28 PM, Jan Hubicka wrote:
  /* Initialization of functions specific to the rtl IR.  */
*************** void
*** 45,50 ****
--- 48,55 ----
  cfg_layout_rtl_register_cfg_hooks (void)
  {
    cfg_hooks = &cfg_layout_rtl_cfg_hooks;
+   rtl_register_value_prof_hooks ();
+   rtl_register_profile_hooks ();

If we move into multiple CFGs at a time, we will have each CFG object to
have local copy of hook pointers, so I would rather not add new ones.
I think it would be better to simply register these hooks just before
profiling code is called in rest_of_handle_* and branch_prob.

I thought about this, the trouble is that the profiling code calls into the
CFG manipulation code in a number of places, and that is sensitive
to the setting of the cfg_hooks. (It also references ir_type directly,
at the moment, though that could be changed.) I really think it's
asking for trouble right now to allow the hooks to be called at
different times.



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