From patchwork Mon Jun 27 01:50:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 640772 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rdBk06RW4z9t19 for ; Mon, 27 Jun 2016 11:51:19 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=rldbU54J; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=oHfrSgc/R373FysJx7ZoJAfEGQwy2Ya/79CsO/jmXkazpwOtt/zlp LdcqwoebFSZfxZv6ubSr6KGMDoiOAk1ZnuuvvAFA8Uz5vtaJ4WiBe/X39yedfxHt y64hnQ5Pj6Xf7Of2+BA9SSiC+yMl+E4N4bVkxo7XddaH6yHyswbg20= 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:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=4RlC11tncwy1+BI+JabLd3buCxA=; b=rldbU54JFTum7oOch30T nemhXYKRZ70AvBsBEKgbZ3CvzXwFePSymz30hpKyVBxNXbYLEi6PZb14qI+GXpLw 4V7oCvCqRCyQWLgzB0AjQV80wt3x+1n3IcZ3wFS1RgAHZBqsmOme+wz7CfMlLipf Ru9H5FyBSdAnEM7E/KrAKzY= Received: (qmail 9636 invoked by alias); 27 Jun 2016 01:51: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 9592 invoked by uid 89); 27 Jun 2016 01:51:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=FOR_EACH_BB_FN, gsi_next, gsi_start_bb, gsi_end_p X-HELO: one.firstfloor.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (193.170.194.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 27 Jun 2016 01:50:59 +0000 Received: from firstfloor.org (174-25-121-21.ptld.qwest.net [174.25.121.21]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by one.firstfloor.org (Postfix) with ESMTPSA id 510CE873F2; Mon, 27 Jun 2016 03:50:55 +0200 (CEST) Received: by firstfloor.org (Postfix, from userid 1000) id 15B06A08F5; Sun, 26 Jun 2016 18:50:28 -0700 (PDT) From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: hubicka@ucw.cz, law@redhat.com, Andi Kleen Subject: [PATCH 2/6] Don't run instrumented value profiler changes with afdo Date: Sun, 26 Jun 2016 18:50:20 -0700 Message-Id: <20160627015024.23444-3-andi@firstfloor.org> In-Reply-To: <20160627015024.23444-2-andi@firstfloor.org> References: <20160627015024.23444-1-andi@firstfloor.org> <20160627015024.23444-2-andi@firstfloor.org> From: Andi Kleen The pass to transform gimple based on value profiling runs with autofdo on, but currently every transformation fails. For indirect calls autofdo does it on its own, and it doesn't suppport other value profiling. So don't run this pass when autofdo is active. This also avoids bogus dump file entries. gcc/: * 2016-06-26 Andi Kleen * value-prof.c (gimple_value_profile_transformations): Don't run when auto_profile is on. --- gcc/value-prof.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/value-prof.c b/gcc/value-prof.c index f9574b6..52068eb 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -645,6 +645,11 @@ gimple_value_profile_transformations (void) basic_block bb; gimple_stmt_iterator gsi; bool changed = false; + + /* Autofdo does all transformations it supports elsewhere. */ + if (flag_auto_profile) + return false; + FOR_EACH_BB_FN (bb, cfun) { for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))