diff options
author | Xinliang David Li <davidxl@google.com> | 2014-07-26 00:06:56 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@gcc.gnu.org> | 2014-07-26 00:06:56 +0000 |
commit | 2243ba513844565f5046055fe610f32df9f8876f (patch) | |
tree | b55990283764ae89e23d3c97dc21584d42c7a7c0 /gcc/value-prof.c | |
parent | 37545fa7226bfa3aa72244dd119a9a82ed26d077 (diff) | |
download | gcc-2243ba513844565f5046055fe610f32df9f8876f.zip gcc-2243ba513844565f5046055fe610f32df9f8876f.tar.gz gcc-2243ba513844565f5046055fe610f32df9f8876f.tar.bz2 |
Make FDO more tolerant to source changes
From-SVN: r213068
Diffstat (limited to 'gcc/value-prof.c')
-rw-r--r-- | gcc/value-prof.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 54a7feb..3e51539 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -1210,7 +1210,17 @@ gimple_mod_subtract_transform (gimple_stmt_iterator *si) return true; } -static pointer_map_t *cgraph_node_map; +static pointer_map_t *cgraph_node_map = 0; + +/* Returns true if node graph is initialized. This + is used to test if profile_id has been created + for cgraph_nodes. */ + +bool +coverage_node_map_initialized_p (void) +{ + return cgraph_node_map != 0; +} /* Initialize map from PROFILE_ID to CGRAPH_NODE. When LOCAL is true, the PROFILE_IDs are computed. when it is false we assume @@ -1223,8 +1233,7 @@ init_node_map (bool local) cgraph_node_map = pointer_map_create (); FOR_EACH_DEFINED_FUNCTION (n) - if (n->has_gimple_body_p () - && !n->only_called_directly_p ()) + if (n->has_gimple_body_p ()) { void **val; if (local) |