From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13126 invoked by alias); 23 Mar 2012 22:29:57 -0000 Received: (qmail 13118 invoked by uid 22791); 23 Mar 2012 22:29:56 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: sourceware.org Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Mar 2012 22:29:42 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 23 Mar 2012 15:29:41 -0700 X-ExtLoop1: 1 Received: from tassilo.jf.intel.com ([10.7.201.151]) by orsmga001.jf.intel.com with ESMTP; 23 Mar 2012 15:29:41 -0700 Received: by tassilo.jf.intel.com (Postfix, from userid 501) id 412B8240FA7; Fri, 23 Mar 2012 15:29:28 -0700 (PDT) From: Andi Kleen To: Easwaran Raman Cc: reply@codereview.appspotmail.com, gcc-patches@gcc.gnu.org Subject: Re: Propagate profile counts after switch case expansion (issue5896043) References: <20120323174310.64276220E1C@agni2.mtv.corp.google.com> Date: Fri, 23 Mar 2012 22:29:00 -0000 In-Reply-To: (Easwaran Raman's message of "Fri, 23 Mar 2012 12:34:19 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2012-03/txt/msg01580.txt.bz2 Easwaran Raman writes: > Some more background on this patch: Right now, while the execution > counts of different case labels of a switch statement are obtained > during profile collection, they are not propagated to RTL. Instead, > counts are regenerated at the RTL level using static heuristics that > tend to weigh branches equally which can cause poor optimization of > hot code. This patch ensures that the counts collected during profile > collection are correctly propagated allowing hot code to be better > optimized by RTL optimizations. Patch tested on x86_64. I think your patch doesn't use the probably to weight the decision tree for non tablejump, right? I looked at this some time ago, but the patch always had problems. -Andi -- ak@linux.intel.com -- Speaking for myself only