From patchwork Mon Sep 2 22:53:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 272090 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "www.sourceware.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 497D82C0084 for ; Tue, 3 Sep 2013 08:54:09 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=CP+SRZkv2aVOQawgiCWhODPSvbY3XPcW3Pcw8S/vUEv0qn2gEMfsF /fI/bBVnsQ1EbmAVZvwI8o2gAekZpgGBrNdiFzFsj5oDTY0ybViDbvnnWGoLU0vj ZPB4Qd+P7KFw2i7bDv7ds4L6PLxQqDDN0Trg/qsXLM6/gBkSO9p718= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=yX34ajmBk6yBaFaMq+Tegdeo7kw=; b=J0TKUSn53oV7i4Ea+PTW AmPf/E7qHxQ1wQAeoTw6cnVIlmMK9TS+bIL08njC3fPbrEXYUk2c+7wGVmHkv65M le1vtz4o4lgtCDGE/vjuuKLeUCp8FNbfv8xIcOfnuAQPEBDefN4ytCdxfWETmq07 jc93LXviXasxbSzH1SG0kQo= Received: (qmail 14922 invoked by alias); 2 Sep 2013 22:54:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 14912 invoked by uid 89); 2 Sep 2013 22:54:02 -0000 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 (AES256-SHA encrypted) ESMTPS; Mon, 02 Sep 2013 22:54:02 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, NO_RELAYS autolearn=ham version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 2A884542E29; Tue, 3 Sep 2013 00:53:58 +0200 (CEST) Date: Tue, 3 Sep 2013 00:53:58 +0200 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Cleanup CFG after profile read/instrumentation Message-ID: <20130902225357.GA10117@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Hi, reading profile/instrumenting breaks basic blocks and introduces fake edges. The broken basic blocks are not re-merged until after LTO streaming that is wasteful. Fixed thus. Profiledbotostrapped/regtsted ppc64-linux, comitted. Index: tree-profile.c =================================================================== --- tree-profile.c (revision 202185) +++ tree-profile.c (working copy) @@ -598,6 +598,8 @@ tree_profiling (void) } } + /* re-merge split blocks. */ + cleanup_tree_cfg (); update_ssa (TODO_update_ssa); rebuild_cgraph_edges ();