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] |
On Sat, Oct 6, 2012 at 5:56 PM, Jan Hubicka <hubicka@ucw.cz> wrote: > Hi, > does this look better? Moving to cfg.c would importing tree-pass.h and rtl.h > that is not cool either. predict.c does all of these. > Obviously can also go to a separate file, if preferred. Attached is how I would do it. What do you think about this? Ciao! Steven * basic-block. (profile_record): New struct, moved from passes.c. * cfghooks.h (struct cfg_hooks) <account_profile_record>: New hook. (account_profile_record): New prototype. * cfghooks.c (account_profile_record): New function. * tree-cfg.c (gimple_account_profile_record): New function (gimple_cfg_hooks): Add it. * cfgrtl.c (rtl_account_profile_record): New function (rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): Add it. * passes.c (check_profile_consistency): Simplify. Move IR-dependent code around using cfghooks machinery.
Attachment:
profile_consistency.diff
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |