From patchwork Thu Sep 10 15:14:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 516316 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 EF8CA140180 for ; Fri, 11 Sep 2015 01:14:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ALrZgvpA; 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:from :to:cc:subject:date:message-id; q=dns; s=default; b=EE4BkOmBiVWW GfxwqV3WIxq5yjL/gOpEMaxUNMdI4EOXkd7sa02I8VJzP6uE2qvh7UxfOpd0114Y gP5CDVJbZllvJdEXnLveLfpYjOGBoVSZdPowsM6kwjyYF1yBbSU03BZ5PwysrBTL jblewdwL/mIqdN5O7u1Y2zkTYWkfJxY= 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:cc:subject:date:message-id; s=default; bh=7TMfnhGOLEI/u4Eisv CZ5to2CEY=; b=ALrZgvpAqWElYhurmaakk9Y8XerSTFtWsw19gdK/6cgOAdTcIR f7+/g8X4x7xhOW0tYAdLRfcF8RsTUsbcZ8yoEUX7butlTVG5NfMNBFEFVuMermur 2JLlYlErtHNdnHhQ4gzvka3EUjTPFXg06yjpPJRYXr6whEcO7MEZAEaRg= Received: (qmail 7757 invoked by alias); 10 Sep 2015 15:14:50 -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 7747 invoked by uid 89); 10 Sep 2015 15:14:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 10 Sep 2015 15:14:48 +0000 Received: from gcc1-power7.osuosl.org (localhost [127.0.0.1]) by gcc1-power7.osuosl.org (8.14.6/8.14.6) with ESMTP id t8AFEiPa051017; Thu, 10 Sep 2015 08:14:44 -0700 Received: (from segher@localhost) by gcc1-power7.osuosl.org (8.14.6/8.14.6/Submit) id t8AFEcrl051011; Thu, 10 Sep 2015 08:14:38 -0700 From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool Subject: [PATCH 1/2] shrink-wrap: Header hygiene Date: Thu, 10 Sep 2015 08:14:28 -0700 Message-Id: <5503d4c7cce8849f8a2901b540b388411b6b6a5a.1441893071.git.segher@kernel.crashing.org> X-IsSubscribed: yes This makes a few functions used only in shrink-wrap.c static, and removes their declarations from shrink-wrap.h . Bootstrapped and regression checked on powerpc64-linux. Is this okay for mainline? Segher 2015-09-10 Segher Boessenkool * shrink-wrap.c (requires_stack_frame_p): Make static. (prepare_shrink_wrap): Likewise. (dup_block_and_redirect): Likewise. * shrink-wrap.h: Remove declarations of those functions. --- gcc/shrink-wrap.c | 6 +++--- gcc/shrink-wrap.h | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c index c90c40a..0ece4cf 100644 --- a/gcc/shrink-wrap.c +++ b/gcc/shrink-wrap.c @@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see PROLOGUE_USED contains the hard registers used in the function prologue. SET_UP_BY_PROLOGUE is the set of registers we expect the prologue to set up for the function. */ -bool +static bool requires_stack_frame_p (rtx_insn *insn, HARD_REG_SET prologue_used, HARD_REG_SET set_up_by_prologue) { @@ -420,7 +420,7 @@ move_insn_for_shrink_wrap (basic_block bb, rtx_insn *insn, to call-saved registers because their values are live across one or more calls during the function. */ -void +static void prepare_shrink_wrap (basic_block entry_block) { rtx_insn *insn, *curr; @@ -465,7 +465,7 @@ prepare_shrink_wrap (basic_block entry_block) /* Create a copy of BB instructions and insert at BEFORE. Redirect preds of BB to COPY_BB if they don't appear in NEED_PROLOGUE. */ -void +static void dup_block_and_redirect (basic_block bb, basic_block copy_bb, rtx_insn *before, bitmap_head *need_prologue) { diff --git a/gcc/shrink-wrap.h b/gcc/shrink-wrap.h index dda9b92..efc8370 100644 --- a/gcc/shrink-wrap.h +++ b/gcc/shrink-wrap.h @@ -23,11 +23,6 @@ along with GCC; see the file COPYING3. If not see #include "function.h" /* In shrink-wrap.c. */ -extern bool requires_stack_frame_p (rtx_insn *, HARD_REG_SET, HARD_REG_SET); -extern void prepare_shrink_wrap (basic_block entry_block); -extern void dup_block_and_redirect (basic_block bb, basic_block copy_bb, - rtx_insn *before, - bitmap_head *need_prologue); extern void try_shrink_wrapping (edge *entry_edge, edge orig_entry_edge, bitmap_head *bb_flags, rtx_insn *prologue_seq); extern edge get_unconverted_simple_return (edge, bitmap_head,