From patchwork Wed Sep 11 19:18:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1161267 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-508921-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="bU7rc0Ta"; 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 46TBX543ftz9s7T for ; Thu, 12 Sep 2019 05:18:45 +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=tZ4X6zsfIiIVciJeg8/iqqrco8WeQ /wnW5nTORwwS8+QtkSOo5REQZkpBONW7/pFPnu8Q6NRmXoGudWuZdNBoGKHPYITL 9DW7fq8Dmn+UjBgKLO16yNivqwwaiUXs2KDy1S87T7NblYY3q6sZ5QNbErVZ7Rrn lbqGkRpiXlPbhM= 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=tmgWa1fEv9d18hOjhQCI6BSUxbU=; b=bU7 rc0TaLlgr/pVscVLL3q5Z+TnBd5EwiLx2f2Tx34OSNsPlQuDlRBBRrH6bd+sJ21h pw14MUa+llutMLHmehiYbqfVrZVOGSZCHIOQUmZnf29uzi9CEtjg3sLpw+MFBwod vUfKV62Z5PJLiSZc0tO5X/zvHQbg8IVM5c3HbQgg= Received: (qmail 106573 invoked by alias); 11 Sep 2019 19:18:36 -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 106474 invoked by uid 89); 11 Sep 2019 19:18:36 -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=shrink-wrap.c, UD:shrink-wrap.c, shrinkwrapc 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:18:35 +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 DC0E51000 for ; Wed, 11 Sep 2019 12:18:33 -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 83D233F59C for ; Wed, 11 Sep 2019 12:18:33 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [31/32] Remove global call sets: shrink-wrap.c References: Date: Wed, 11 Sep 2019 20:18:32 +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 straight replacement of "calls we can clobber without saving them first". 2019-09-11 Richard Sandiford gcc/ * shrink-wrap.c: Include function-abi.h. (requires_stack_frame_p): Use crtl->abi to test whether the current function can use a register without saving it first. Index: gcc/shrink-wrap.c =================================================================== --- gcc/shrink-wrap.c 2019-09-10 19:56:32.577268091 +0100 +++ gcc/shrink-wrap.c 2019-09-11 19:49:15.133482515 +0100 @@ -43,7 +43,7 @@ Software Foundation; either version 3, o #include "regcprop.h" #include "rtl-iter.h" #include "valtrack.h" - +#include "function-abi.h" /* Return true if INSN requires the stack frame to be set up. PROLOGUE_USED contains the hard registers used in the function @@ -76,7 +76,7 @@ requires_stack_frame_p (rtx_insn *insn, } if (hard_reg_set_intersect_p (hardregs, prologue_used)) return true; - hardregs &= ~call_used_or_fixed_regs; + hardregs &= ~crtl->abi->full_reg_clobbers (); for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) if (TEST_HARD_REG_BIT (hardregs, regno) && df_regs_ever_live_p (regno))