From patchwork Thu Apr 18 21:12:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 237739 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 "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 39F8D2C0204 for ; Fri, 19 Apr 2013 07:12:16 +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 :mime-version:date:message-id:subject:from:to:cc:content-type; q=dns; s=default; b=ubsr8sm7/zJQ29vyRJpkMpIYW/5ogRnMQKk/aB4qVxt gEZKVx+SFl13xO1cCxb+Pc8W3k7ncdJaa27+UuukSgx40Vg/gwsY5VmUeA35fDco BHhPD8WMI9hAlF8WN4g8QCLoJ3PmZt0ZyvMX3hXsVrandzvpxYq3vPcMVaEsRMgw = 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 :mime-version:date:message-id:subject:from:to:cc:content-type; s=default; bh=RSa14tVuUWXnIRu2uw1R+gHS27Q=; b=O/xPXuyyPlaBMoNEL d+A4Bm8WXEXJkMjdyPpS3Ut1Q+aJtCmMbt9by0e38vIbtXJFAY1yfcZinCJq8duB wlDa2kr2i6sUvO8p8GzPdt5osdsTu1bmfvGg745bnqSZOMcerLhMVffJilNMsYgP gvrnnZe9c1Mhxjx6DlsF8tXAtk= Received: (qmail 4761 invoked by alias); 18 Apr 2013 21:12:10 -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 4749 invoked by uid 89); 18 Apr 2013 21:12:10 -0000 X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from mail-ea0-f177.google.com (HELO mail-ea0-f177.google.com) (209.85.215.177) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 18 Apr 2013 21:12:09 +0000 Received: by mail-ea0-f177.google.com with SMTP id q14so1438458eaj.36 for ; Thu, 18 Apr 2013 14:12:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type:x-gm-message-state; bh=lIdj7qhKpBrDITJ+MJFVteVTvfx40QmhGmotVseKWl0=; b=VjA5ANfcErbTaAZg9C9gF3S2DnvPSDPGabLaNH2hCnjHWItMs9eMkvxXDfK9hNUAs5 6flnHyMW0QobdG6GMn3gijqB7+TZIe7ltFIGdrsh3HzR9Vjb+cnZdtQbiU9fOhO4+OEp Fh6ZaS9gl25BWrcReyjPtYLrI3ioeywQrsE4jZ8i2ALFVM9h5j9TJeohIIzbm5XdeE15 J0Jcu2T1OM7hnT3AgnZEvtIew+B9CCgok0WIDqB8/CLtdvRMSohb2mngd289Uxa/Ku4v GEDWcud710YDnypS0Q0GTdbdOcJjiaMZURuMHyWF5hTphcbS6ux349Q96q1FstFeZ1PQ 1E6w== MIME-Version: 1.0 X-Received: by 10.14.0.5 with SMTP id 5mr34126244eea.13.1366319527071; Thu, 18 Apr 2013 14:12:07 -0700 (PDT) Received: by 10.14.214.195 with HTTP; Thu, 18 Apr 2013 14:12:06 -0700 (PDT) Date: Thu, 18 Apr 2013 14:12:06 -0700 Message-ID: Subject: [GOOGLE] Fix the LIPO support in AutoFDO From: Dehao Chen To: GCC Patches Cc: David Li X-Gm-Message-State: ALoCoQm0Sbg8gSUKSvo6Ix6oFmlcaBGPT0/d+ywz8OXwTPGFKNqp35qm9oBijnOlW2SZiYWYJHEcBde5yRgwH93CEPrgXiGJjEe4mTBqn7WywSdd8aNascWtS1Ysa422/9R6XyliKKJrNOf8fSvuTGLo9aq2I4UHVd+DyxaQVlgOWp9FojpzWu7hu3I0ni+mc6XZvI9LIy2y This patch fixes LIPO support in AutoFDO. Bootstrapped and passed regression tests. OK for google-4_7 branch? Thanks, Dehao Index: gcc/coverage.c =================================================================== --- gcc/coverage.c (revision 198056) +++ gcc/coverage.c (working copy) @@ -2857,7 +2857,7 @@ coverage_init (const char *filename, const char* s strcat (main_input_file_name, source_name); } - if (flag_branch_probabilities) + if (flag_branch_probabilities && !flag_auto_profile) read_counts_file (da_file_name, 0); /* Reads at most one auxiliary GCDA file since we don't support merging */ Index: gcc/auto-profile.c =================================================================== --- gcc/auto-profile.c (revision 198057) +++ gcc/auto-profile.c (working copy) @@ -1850,6 +1850,13 @@ auto_profile (void) pop_cfun (); } + cgraph_pre_profiling_inlining_done = true; + cgraph_process_module_scope_statics (); + /* Now perform link to allow cross module inlining. */ + cgraph_do_link (); + varpool_do_link (); + cgraph_unify_type_alias_sets (); + return TODO_rebuild_cgraph_edges; }