]> gcc.gnu.org Git - gcc.git/commit
Check that passes do not forget to define profile
authorJan Hubicka <jh@suse.cz>
Thu, 24 Aug 2023 13:10:46 +0000 (15:10 +0200)
committerJan Hubicka <jh@suse.cz>
Thu, 24 Aug 2023 13:10:46 +0000 (15:10 +0200)
commit0c78240fd7d519fc27ca822f66a92f85edf43f70
tree273eeb0cf60590b12f8d1d7efbcf7e1d9c4676f3
parent7564fe98657ad5ede34bd08f5279778fa8698865
Check that passes do not forget to define profile

This patch extends verifier to check that all probabilities and counts are
initialized if profile is supposed to be present.  This is a bit complicated
by the posibility that we inline !flag_guess_branch_probability function
into function with profile defined and in this case we need to stop
verification.  For this reason I added flag to cfg structure tracking this.

Bootstrapped/regtested x86_64-linux, comitted.

gcc/ChangeLog:

* cfg.h (struct control_flow_graph): New field full_profile.
* auto-profile.cc (afdo_annotate_cfg): Set full_profile to true.
* cfg.cc (init_flow): Set full_profile to false.
* graphite.cc (graphite_transform_loops): Set full_profile to false.
* lto-streamer-in.cc (input_cfg): Initialize full_profile flag.
* predict.cc (pass_profile::execute): Set full_profile to true.
* symtab-thunks.cc (expand_thunk): Set full_profile to true.
* tree-cfg.cc (gimple_verify_flow_info): Verify that profile is full
if full_profile is set.
* tree-inline.cc (initialize_cfun): Initialize full_profile.
(expand_call_inline): Combine full_profile.
gcc/auto-profile.cc
gcc/cfg.cc
gcc/cfg.h
gcc/graphite.cc
gcc/lto-streamer-in.cc
gcc/predict.cc
gcc/symtab-thunks.cc
gcc/tree-cfg.cc
gcc/tree-inline.cc
This page took 0.06244 seconds and 6 git commands to generate.