From patchwork Wed Sep 11 19:15:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1161261 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-508915-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="IAW1/phB"; 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 46TBSy3PVlz9s7T for ; Thu, 12 Sep 2019 05:16:02 +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=UtOk3WiOe5dEY5qW+OiMqd1crkzPJ TqSYLyhZx1T3QZh+oVspyoitv/98+4vDzfq8NeG3WeeWcWCdhw6Y5/9VfqnD5d/y E0mtMM2TRtJ9tTWPO2x5Z72SleRNUnJkM9nRVMt0Rc95TOID7lgJlfbvTSxYMhSF vWzNciK+vkPPNM= 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=zY9n63GLBTIyV1M3Ui/JTLDYCTA=; b=IAW 1/phBOywr0QgEhQ0ARn/yAnS6AtTioCLVKxiZTFL/Tco+C7kjCnQWBb6ndijcM3/ AjQ4fcEJeAuSQhSJwsy/Q2Ui5hOUvswO4BBbllgScY/x0OKAt3tPEUJIFu1XShpA 2FRjCwUVblLvtiw5MKiUb2GL+wWCCccOsKhvKYms= Received: (qmail 21857 invoked by alias); 11 Sep 2019 19:15:54 -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 21715 invoked by uid 89); 11 Sep 2019 19:15:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=wrongly, HX-Languages-Length:1449 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:15:53 +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 EE37B1000 for ; Wed, 11 Sep 2019 12:15:51 -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 964153F59C for ; Wed, 11 Sep 2019 12:15:51 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [25/32] Remove global call sets: regcprop.c References: Date: Wed, 11 Sep 2019 20:15:50 +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 This is a direct replacement of an existing test for fully and partially clobbered registers. 2019-09-11 Richard Sandiford gcc/ * regcprop.c (copyprop_hardreg_forward_1): Use the recorded mode of the register when deciding whether it is no longer available after a call. Index: gcc/regcprop.c =================================================================== --- gcc/regcprop.c 2019-09-11 19:47:32.898202916 +0100 +++ gcc/regcprop.c 2019-09-11 19:48:51.961645788 +0100 @@ -1055,16 +1055,15 @@ copyprop_hardreg_forward_1 (basic_block function_abi abi = call_insn_abi (insn); for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) - if ((abi.clobbers_full_reg_p (regno) - || (targetm.hard_regno_call_part_clobbered - (abi.id (), regno, vd->e[regno].mode))) + if (vd->e[regno].mode != VOIDmode + && abi.clobbers_reg_p (vd->e[regno].mode, regno) && (regno < set_regno || regno >= set_regno + set_nregs)) kill_value_regno (regno, 1, vd); /* If SET was seen in CALL_INSN_FUNCTION_USAGE, and SET_SRC - of the SET isn't in regs_invalidated_by_call hard reg set, - but instead among CLOBBERs on the CALL_INSN, we could wrongly - assume the value in it is still live. */ + of the SET isn't clobbered by ABI, but instead among + CLOBBERs on the CALL_INSN, we could wrongly assume the + value in it is still live. */ if (ksvd.ignore_set_reg) kill_clobbered_values (insn, vd); }