From patchwork Thu Aug 22 13:35:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1151603 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-507513-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="byjt5ytn"; dkim-atps=neutral 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 46DlsC0Z92z9sP8 for ; Thu, 22 Aug 2019 23:35:24 +1000 (AEST) 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:mime-version:content-type; q=dns; s=default; b=JXqWOyeFIrG3SzgJT7f6p0LiDez0jgCl7Xdsg1gWBTv1qpbXrT 5ANyzwFr75VTh4v2Hg/19Iy1UfdzCslXHZ9J2AlOl872qWrnXkteT1NgdL64afPU i8gZuV3TLxpOzKzWtrSRGVz6AdO1r5WJisr+EvmdRph2CLl4/hRyhj1Jk= 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:mime-version:content-type; s= default; bh=5Lockw5eJE2AWf6ZY4Ub6yFitRA=; b=byjt5ytnKFuFEaThnWtj Ag89kl2t57GErzcRXAuLQWwstpTRs36jvMgZ6jvPBunri87NkWjc9RQ6rsJvf4lE eOEXwLOxQvxj1Fg6u6VrDTteVmwPDRp8MxSqYiUIKG45m3tBb0iIpK1x1LtyFyyn lQGhpflyN7wWAIvDemrZ7AQ= Received: (qmail 45393 invoked by alias); 22 Aug 2019 13:35:17 -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 45383 invoked by uid 89); 22 Aug 2019 13:35:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Aug 2019 13:35:14 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E3F94AAB2; Thu, 22 Aug 2019 13:35:11 +0000 (UTC) Date: Thu, 22 Aug 2019 15:35:11 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org cc: hjl.tools@gmail.com, ubizjak@gmail.com Subject: [PATCH] Fix PR91522 Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 This fixes quadraticness in STV and makes machine dep reorg : 89.07 ( 95%) 0.02 ( 18%) 89.10 ( 95%) 54 kB ( 0%) drop to zero. Anybody remembers why it is the way it is now? Bootstrap / regtest running on x86_64-unknown-linux-gnu. OK? Thanks, Richard. 2019-08-22 Richard Biener PR target/91522 * config/i386/i386-features.c (scalar_chain::add_insn): Do not iterate over all defs of a reg. Index: gcc/config/i386/i386-features.c =================================================================== --- gcc/config/i386/i386-features.c (revision 274764) +++ gcc/config/i386/i386-features.c (working copy) @@ -419,10 +419,7 @@ scalar_chain::add_insn (bitmap candidate df_ref def; for (ref = DF_INSN_UID_DEFS (insn_uid); ref; ref = DF_REF_NEXT_LOC (ref)) if (!HARD_REGISTER_P (DF_REF_REG (ref))) - for (def = DF_REG_DEF_CHAIN (DF_REF_REGNO (ref)); - def; - def = DF_REF_NEXT_REG (def)) - analyze_register_chain (candidates, def); + analyze_register_chain (candidates, ref); for (ref = DF_INSN_UID_USES (insn_uid); ref; ref = DF_REF_NEXT_LOC (ref)) if (!DF_REF_REG_MEM_P (ref)) analyze_register_chain (candidates, ref);