mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
b0d50cbb42ab2ce5fab8a832cb82fc54b371c914
Bootstrapping with autoprofiledbootstrap, LTO and checking enables ICEs in WPA because we end up mixing local and IPA count in ipa-cp.cc:update_specialized_profile. This is because of missing call to profile_count::adjust_for_ipa_scaling. While looking into that I however noticed that the function forgets to update indirect call edges. This made me to commonize same logic which currently exists in clone_inlined_nodes, update_specialized_profile, update_profiling_info and update_counts_for_self_gen_clones. While testing it I noticed that we also ICE when linking with -fdump-ipa-all-details-blocks since IPA and local counts are temporarily mixed during IPA transformation stage, so I also added check to profile_count::dump to not crash and added verifier to gimple_verify_flow_info. Other problem I also noticed is that while profile updates done by inliner (via cgraph_node::clone) are correctly using global0 profiles instead of erasing profile completely when IPA counts drops to 0, the scaling in ipa-cp is not doing that, so we lose info and possibly some code quality. I will fix that incrementally. Similarly ipa-split, when offlining region with 0 entry count may re-do frequency propagation to get something useful. gcc/ChangeLog: * cgraph.cc (cgraph_node::apply_scale): New member function. * cgraph.h (struct cgraph_node): declare. * ipa-cp.cc (update_counts_for_self_gen_clones): Use cgraph_node::apply_scale. (update_profiling_info): Do not overwrite local profile when dropping to 0 global profile. (update_specialized_profile): Likewise. * ipa-inline-transform.cc (update_noncloned_counts): Remove. (can_remove_node_now_p_1): Fix formating. (clone_inlined_nodes): Use cgraph_node::apply_scale. * profile-count.cc (profile_count::dump): Do not ICE when count is not compatible with entry block count. * tree-cfg.cc (gimple_verify_flow_info): Check compatibility of count and entry block count.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
30.7%
C
30%
Ada
14.5%
D
6.1%
Go
5.7%
Other
12.5%