diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-11-28 17:04:41 +0000 |
---|---|---|
committer | Jan Hubicka <hubicka@ucw.cz> | 2019-11-28 17:04:41 +0000 |
commit | 59b9aeafed439cacf859f7cad873057fcce79232 (patch) | |
tree | bad6314386dc556d1b6227cbba58b544df470bf7 | |
parent | 99a82e4ab8d2ec36236dd6818fbb9cfe24bf5e01 (diff) |
* profile-count.c (profile_count::combine_with_ipa_count): Return
uninitialized count if called on ininitialized count.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278815 138bc75d-0d04-0410-961f-82ee72b054a4
-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 87732c84850..b85bda2c02a 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 e91f9cbd26d..fb978c634fd 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; |