From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126667 invoked by alias); 1 Jul 2017 12:34:44 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 126644 invoked by uid 89); 1 Jul 2017 12:34:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-9.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=5146 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 01 Jul 2017 12:34:43 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 0EAB5543C9C; Sat, 1 Jul 2017 14:34:40 +0200 (CEST) Date: Sat, 01 Jul 2017 12:34:00 -0000 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Update profile in gimple_flow_call_edges_add Message-ID: <20170701123440.GC29094@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2017-07/txt/msg00008.txt.bz2 Hi, another place we produce edges without profile are fake edges in flow_call_edges_add. These are probably not that important, but it is better to have things consistent. Bootstrapped/regtested x86_64-linux, comitted. Honza * 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. Index: cfgrtl.c =================================================================== --- cfgrtl.c (revision 249866) +++ cfgrtl.c (working copy) @@ -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)) Index: profile-count.h =================================================================== --- profile-count.h (revision 249866) +++ profile-count.h (working copy) @@ -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); Index: tree-cfg.c =================================================================== --- tree-cfg.c (revision 249866) +++ tree-cfg.c (working copy) @@ -8211,7 +8211,9 @@ gimple_flow_call_edges_add (sbitmap bloc 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 bloc } if (blocks_split) - verify_flow_info (); + checking_verify_flow_info (); return blocks_split; }