From patchwork Wed Sep 11 19:07:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1161242 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-508896-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="SePH5s+n"; 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 46TBHK5JLxz9s7T for ; Thu, 12 Sep 2019 05:07:39 +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:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=default; b=uQMwsVJdD99QrH9pW+HEngb2s7mje VsK6Sr8QGJY469eqnWN/mghKM+lwnHDSvYPcSu52XunSi/LzGm74SbxDKfhpwBVX S/pnSVGNZOwT46+hCGl1jmhjAY+gX0wKtIFRHXyAub/hSyM8y/kOgRclLcBeUjKn ahWKHOeEdFPA0c= 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:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=default; bh=Jo69Ono2Ps+Rb180suzQ1d2Y+3M=; b=SeP H5s+nZehBxg+HVFVLXBJ7JuTSm8p5C5ZKxzoS0K04v5XsKM74hWbKRrCG4CjrTSg 7IEdS5EZaY/WqVW4GnBjo89PiCWlr1xFk6CDj8LzLF6LeQH5uu/cdSZX8bqzqrSA +mLipZ8x/Gwe4GWWwtOK6OmP4qt5NoPoFM6rHtoA= Received: (qmail 86931 invoked by alias); 11 Sep 2019 19:07:33 -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 86923 invoked by uid 89); 11 Sep 2019 19:07:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:993 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Sep 2019 19:07:32 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F2BC428 for ; Wed, 11 Sep 2019 12:07:30 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.99.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9B2643F59C for ; Wed, 11 Sep 2019 12:07:30 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [08/32] Remove global call sets: cfgcleanup.c References: Date: Wed, 11 Sep 2019 20:07:29 +0100 In-Reply-To: (Richard Sandiford's message of "Wed, 11 Sep 2019 20:02:26 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes old_insns_match_p just tests whether two instructions are similar enough to merge. With call_insn_abi it makes more sense to compare the ABIs directly. 2019-09-11 Richard Sandiford gcc/ * cfgcleanup.c (old_insns_match_p): Compare the ABIs of calls instead of the call-clobbered sets. Index: gcc/cfgcleanup.c =================================================================== --- gcc/cfgcleanup.c 2019-09-11 19:47:24.402262786 +0100 +++ gcc/cfgcleanup.c 2019-09-11 19:47:50.610078102 +0100 @@ -1227,13 +1227,7 @@ old_insns_match_p (int mode ATTRIBUTE_UN } } - HARD_REG_SET i1_used = call_insn_abi (i1).full_reg_clobbers (); - HARD_REG_SET i2_used = call_insn_abi (i2).full_reg_clobbers (); - /* ??? This preserves traditional behavior; it might not be needed. */ - i1_used |= fixed_reg_set; - i2_used |= fixed_reg_set; - - if (i1_used != i2_used) + if (call_insn_abi (i1) != call_insn_abi (i2)) return dir_none; }