From patchwork Thu Jan 26 10:04:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 720035 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 3v8HZw1RTDz9ryT for ; Thu, 26 Jan 2017 21:04:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="aD8dnlF+"; 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=OWIgP0mBsRCjc5dn5 nOXxN0UPi8p+y7ATnQvppelDWBtuY9BMLCad/hKE2Pa/BByc0Ed8Ol6vTF0WpvtL 9Xte30o6dVtePwc+WnCwFWAVdzRtzrhRQ9XrMnkycs1oFtGdUoP2/5GWDqQ4M4ID NgeCriIWc7T4wABapL8smKgcUw= 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:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=EAGipERHjTbPLjZMhiYBn4e 3nv8=; b=aD8dnlF+nSZR0VAbus6axyeaU+lD0g2GB5cEKY4cBC8JOv1eCwXNh+0 6ERGChmuEBnEl7LjxnBNSvIxirHYarvvCM/j3RBGOKFa9+RspUPaaRUIX+7ptfLt mk/T+VzUm8vY6IPZgya/+A7veJd/hIAl+CJdpasaYVScV4Qx1Dus= Received: (qmail 118891 invoked by alias); 26 Jan 2017 10:04:31 -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 118878 invoked by uid 89); 26 Jan 2017 10:04:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=path_length, H*i:CAFiYyc12K, H*f:sk:xk_XLp2, H*MI:sk:xk_XLp2 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; Thu, 26 Jan 2017 10:04:28 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 30399547E17; Thu, 26 Jan 2017 11:04:26 +0100 (CET) Date: Thu, 26 Jan 2017 11:04:26 +0100 From: Jan Hubicka To: Richard Biener Cc: Jan Hubicka , GCC Patches , Jeff Law Subject: Re: Enable jump threading on maths meeting hot paths Message-ID: <20170126100425.GA60443@kam.mff.cuni.cz> References: <20170125181107.GB14317@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) > > + if (!contains_hot_bb && speed_p) > > + contains_hot_bb |= optimize_bb_for_speed_p (bb); > > + > > Hmm, but you are also counting the destination of the threading here > which we will > not duplicate. Shouldn't this be under the if (j < path_length - 1) > conditional so we > look for hot BBs we are actually duplicating only (similar restrictions apply to > path[0]?). Aha, you are right. I am re-testing updated patch (it also solves the PR) Honza Index: tree-ssa-threadbackward.c =================================================================== --- tree-ssa-threadbackward.c (revision 244732) +++ tree-ssa-threadbackward.c (working copy) @@ -159,6 +159,7 @@ profitable_jump_thread_path (vec= PARAM_VALUE (PARAM_MAX_FSM_THREAD_PATH_INSNS)) {