aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r--gcc/tree-profile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index b4435b9..df60eda 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -785,7 +785,8 @@ tree_profiling (void)
if (flag_branch_probabilities
&& !thunk
&& flag_profile_values
- && flag_value_profile_transformations)
+ && flag_value_profile_transformations
+ && profile_status_for_fn (cfun) == PROFILE_READ)
gimple_value_profile_transformations ();
/* The above could hose dominator info. Currently there is