cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability consistency.
authorJan Hubicka <hubicka@ucw.cz>
Sun, 2 Jul 2017 22:27:50 +0000 (00:27 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 2 Jul 2017 22:27:50 +0000 (22:27 +0000)
* cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
consistency.

From-SVN: r249888

gcc/ChangeLog
gcc/cfgrtl.c

index 73e569551b77e21364faf9e2259299f08006ee67..64793d9a95f4145ed58b86b075b6c5bc6316c23d 100644 (file)
@@ -1,3 +1,8 @@
+2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
+
+       * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
+       consistency.
+
 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
 
        * dumpfile.c: Include profile-count.h
index b0f9104ac12e999582f2adc4e1d0c2a0d01a372e..c78cb8ee084392e88f88e622a4961631b8e30f17 100644 (file)
@@ -2448,13 +2448,11 @@ rtl_verify_edges (void)
        {
          if (!BRANCH_EDGE (bb)->probability.initialized_p ())
            {
-             /* FIXME: sometimes we create BBs with only branch edge
-                probability defined.  */
-             if (0)
+             if (profile_status_for_fn (cfun) != PROFILE_ABSENT)
                {
-                 error ("verify_flow_info: "
-                        "REG_BR_PROB is set but cfg probability is not");
-                 err = 1;
+                 error ("verify_flow_info: "
+                        "REG_BR_PROB is set but cfg probability is not");
+                 err = 1;
                }
            }
          else if (XINT (note, 0)