[RFC][PATCH] Clean up of histogram allocation and release.
Martin Liška
mliska@suse.cz
Wed Aug 1 10:14:00 GMT 2018
Hi.
Attempt of the patch is to remove all histograms right after
"profile_estimate" pass. Then nobody should use them. That
will simplify code we'll not need verification and currently
we leaked some histograms till the end of compilation.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Ready to be installed?
Martin
gcc/ChangeLog:
2018-07-31 Martin Liska <mliska@suse.cz>
* auto-profile.c (afdo_indirect_call): Do not remove
histograms.
* cfgexpand.c (pass_expand::execute): Likewise.
* cgraph.c (release_function_body): Likewise.
* gimple-iterator.c (gsi_replace): Likewise.
(gsi_remove): Likewise.
* ipa-profile.c (ipa_profile_generate_summary):
Release all histograms.
* tree-cfg.c (verify_gimple_in_cfg): Do not
verify histograms.
(move_block_to_fn): Do not remove histograms.
* value-prof.c (gimple_remove_histogram_value):
Remove.
(gimple_remove_stmt_histograms): Likewise.
(visit_hist): Likewise.
(verify_histograms): Likewise.
(gimple_divmod_fixed_value_transform): Do not
remove histograms.
(gimple_mod_pow2_value_transform): Likewise.
(gimple_mod_subtract_transform): Likewise.
(gimple_ic_transform): Likewise.
(gimple_stringops_transform): Likewise.
(stringop_block_profile): Likewise.
(gimple_find_values_to_profile): Do not produce
extra dump file output.
* value-prof.h: Remove declarations.
gcc/testsuite/ChangeLog:
2018-07-31 Martin Liska <mliska@suse.cz>
* gcc.dg/tree-prof/val-prof-6.c: Do not scan histograms
in optimized dump, it's already removed in that pass.
---
gcc/auto-profile.c | 1 -
gcc/cfgexpand.c | 1 -
gcc/cgraph.c | 2 -
gcc/gimple-iterator.c | 2 -
gcc/ipa-profile.c | 6 +-
gcc/testsuite/gcc.dg/tree-prof/val-prof-6.c | 6 +-
gcc/tree-cfg.c | 2 -
gcc/value-prof.c | 127 +-------------------
gcc/value-prof.h | 3 -
9 files changed, 11 insertions(+), 139 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Clean-up-of-histogram-allocation-and-release.patch
Type: text/x-patch
Size: 13034 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180801/36f3bdfa/attachment.bin>
More information about the Gcc-patches
mailing list