diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-07-01 14:31:25 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-07-01 12:31:25 +0000 |
commit | 36d95aa8913ae43c998e0917711856d307cc5f00 (patch) | |
tree | 400f5ada36f0bf4301fbc37cebca6ec74879337f | |
parent | a4f20288d8d42fff6bb3487aa8f56e5b9b892656 (diff) | |
download | gcc-36d95aa8913ae43c998e0917711856d307cc5f00.zip gcc-36d95aa8913ae43c998e0917711856d307cc5f00.tar.gz gcc-36d95aa8913ae43c998e0917711856d307cc5f00.tar.bz2 |
cfgrtl.c (rtl_flow_call_edges_add): Update profile.
* cfgrtl.c (rtl_flow_call_edges_add): Update profile.
* tree-cfg.c (gimple_flow_call_edges_add): Likewise.
* profile-count.h (max_safe_multiplier): Make unsigned.
(profile_count::guessed_zero): New.
From-SVN: r249869
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cfgrtl.c | 4 | ||||
-rw-r--r-- | gcc/profile-count.h | 9 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 6 |
4 files changed, 22 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ad7c00..8595703 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2017-07-01 Jan Hubicka <hubicka@ucw.cz> + * cfgrtl.c (rtl_flow_call_edges_add): Update profile. + * tree-cfg.c (gimple_flow_call_edges_add): Likewise. + * profile-count.h (max_safe_multiplier): Make unsigned. + (profile_count::guessed_zero): New. + +2017-07-01 Jan Hubicka <hubicka@ucw.cz> + * bb-reorder.c (fix_up_crossing_landing_pad, fix_crossing_conditional_branches): Use make_single_succ_edge to keep profile consistent. diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index f2a238c..b0f9104a 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -4904,7 +4904,9 @@ rtl_flow_call_edges_add (sbitmap blocks) blocks_split++; } - make_edge (bb, EXIT_BLOCK_PTR_FOR_FN (cfun), EDGE_FAKE); + edge ne = make_edge (bb, EXIT_BLOCK_PTR_FOR_FN (cfun), EDGE_FAKE); + ne->probability = profile_probability::guessed_never (); + ne->count = profile_count::guessed_zero (); } if (insn == BB_HEAD (bb)) diff --git a/gcc/profile-count.h b/gcc/profile-count.h index 6a10315..73bc8ed 100644 --- a/gcc/profile-count.h +++ b/gcc/profile-count.h @@ -506,7 +506,7 @@ class GTY(()) profile_count /* Assume numbers smaller than this to multiply. This is set to make testsuite pass, in future we may implement precise multiplication in higer rangers. */ - static const int64_t max_safe_multiplier = 131072; + static const uint64_t max_safe_multiplier = 131072; public: /* Used for counters which are expected to be never executed. */ @@ -514,6 +514,13 @@ public: { return from_gcov_type (0); } + static profile_count guessed_zero () + { + profile_count c; + c.m_val = 0; + c.m_quality = profile_guessed; + return c; + } static profile_count one () { return from_gcov_type (1); diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 848b20f..24b06b9 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -8211,7 +8211,9 @@ gimple_flow_call_edges_add (sbitmap blocks) if (e) blocks_split++; } - make_edge (bb, EXIT_BLOCK_PTR_FOR_FN (cfun), EDGE_FAKE); + e = make_edge (bb, EXIT_BLOCK_PTR_FOR_FN (cfun), EDGE_FAKE); + e->probability = profile_probability::guessed_never (); + e->count = profile_count::guessed_zero (); } gsi_prev (&gsi); } @@ -8220,7 +8222,7 @@ gimple_flow_call_edges_add (sbitmap blocks) } if (blocks_split) - verify_flow_info (); + checking_verify_flow_info (); return blocks_split; } |