[PATCH 1/2] shrink-wrap: Header hygiene

H.J. Lu hjl.tools@gmail.com
Thu Sep 10 19:01:00 GMT 2015


On Thu, Sep 10, 2015 at 8:14 AM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> 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  <segher@kernel.crashing.org>
>
>         * 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.

It breaks build on i386:

config/i386/i386.c:     && requires_stack_frame_p (insn, prologue_used,

This patch fixes it.

-- 
H.J.
---
diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c
index 0ece4cf..d10795a 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.  */
-static bool
+bool
 requires_stack_frame_p (rtx_insn *insn, HARD_REG_SET prologue_used,
  HARD_REG_SET set_up_by_prologue)
 {
diff --git a/gcc/shrink-wrap.h b/gcc/shrink-wrap.h
index efc8370..6819901 100644
--- a/gcc/shrink-wrap.h
+++ b/gcc/shrink-wrap.h
@@ -23,6 +23,7 @@ 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 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,



More information about the Gcc-patches mailing list