https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91176

--- Comment #5 from Jan Hubicka <hubicka at ucw dot cz> ---
I suppose it is previously latent problem that we do not skip debug
statements. Does something like this help?

Index: ipa-fnsummary.c
===================================================================
--- ipa-fnsummary.c     (revision 273479)
+++ ipa-fnsummary.c     (working copy)
@@ -2078,8 +2078,8 @@ analyze_function_body (struct cgraph_nod

       fix_builtin_expect_stmt = find_foldable_builtin_expect (bb);

-      for (gimple_stmt_iterator bsi = gsi_start_bb (bb); !gsi_end_p (bsi);
-          gsi_next (&bsi))
+      for (gimple_stmt_iterator bsi = gsi_start_nondebug_bb (bb);
+          !gsi_end_p (bsi); gsi_next_nondebug (&bsi))
        {
          gimple *stmt = gsi_stmt (bsi);
          int this_size = estimate_num_insns (stmt, &eni_size_weights);

Reply via email to