diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-11-28 18:04:41 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-11-28 17:04:41 +0000 |
commit | b225a29b8ced82d88b0a2fa142cb071335d91fd3 (patch) | |
tree | bad6314386dc556d1b6227cbba58b544df470bf7 /gcc | |
parent | c3f1ae8a30a3d55a8d38ad8c5724edb7ca19761b (diff) | |
download | gcc-b225a29b8ced82d88b0a2fa142cb071335d91fd3.zip gcc-b225a29b8ced82d88b0a2fa142cb071335d91fd3.tar.gz gcc-b225a29b8ced82d88b0a2fa142cb071335d91fd3.tar.bz2 |
profile-count.c (profile_count::combine_with_ipa_count): Return uninitialized count if called on ininitialized count.
* profile-count.c (profile_count::combine_with_ipa_count): Return
uninitialized count if called on ininitialized count.
From-SVN: r278815
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/profile-count.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 87732c8..b85bda2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-11-28 Jan Hubicka <hubicka@ucw.cz> + * profile-count.c (profile_count::combine_with_ipa_count): Return + uninitialized count if called on ininitialized count. + +2019-11-28 Jan Hubicka <hubicka@ucw.cz> + * ipa-inline-transform.c (inline_transform): Scale profile before redirecting. diff --git a/gcc/profile-count.c b/gcc/profile-count.c index e91f9cb..fb978c6 100644 --- a/gcc/profile-count.c +++ b/gcc/profile-count.c @@ -373,6 +373,8 @@ profile_count::adjust_for_ipa_scaling (profile_count *num, profile_count profile_count::combine_with_ipa_count (profile_count ipa) { + if (!initialized_p ()) + return *this; ipa = ipa.ipa (); if (ipa.nonzero_p ()) return ipa; |