aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp23/lambda-scope2.C
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2025-10-15 09:49:21 +0200
committerJan Hubicka <hubicka@ucw.cz>2025-10-15 09:55:17 +0200
commita93f80feeef744649dc426a59a5860224d13e68d (patch)
tree2753941c48f3e93e7d22f03c408dbd3e07766673 /gcc/testsuite/g++.dg/cpp23/lambda-scope2.C
parent24cc91f5ca8956bfc12a7533b665d9830846110a (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
Cleanup max of profile_countHEADtrunkmaster
profile_count::max is not implemented same way as other arithmetics on profile counts which generally require counts to be compatible and returns minimum of qualities of input counts. Reason is that originally it was used to compute statistics of whole callgraph profile so inliner weights can be scaled to reasonable integers interprocedurally. It also combines qulities weird way so the same counter could be used to determine what quality of profile is available. That code had roundoff error issues and was replaced by sreals. Now max is mostly used to determine cfg->max_count which is used to scale counts to reasonable integers intraprocedurally and is still being used i.e. by IRA. There are also few places where max is used for normal arithmetics when updating profile. For computing max_count we need max to still be a bit special so max (uninitialized, initialized) returns initialized rather then uninitialized. Partial profiles are later handled specially. This patch renames max to max_prefer_initialized to make it clear and updates implementation to require compatible profiles. I checked this behaviour is good for other places using it as well. I also turned function to static, since a = a->max (b) looks odd. gcc/ChangeLog: * auto-profile.cc (scale_bb_profile): Use profile_count::max_prefer_initialized. (afdo_adjust_guessed_profile): Likewise. * bb-reorder.cc (edge_order): Do not use max. * cfghooks.cc (merge_blocks): Likewise. * ipa-fnsummary.cc (param_change_prob): Likewise. * ipa-inline-transform.cc (inline_transform): Likewise. * predict.cc (update_max_bb_count): Likewise. (estimate_bb_frequencies): Likewise. (rebuild_frequencies): Likewise. * tree-ssa-loop-unswitch.cc (struct unswitch_predicate): Likewise. * profile-count.h (profile_count::max): Rename to (profile_count::max_prefer_initialized): this; update handling of qualities.
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp23/lambda-scope2.C')
0 files changed, 0 insertions, 0 deletions