Tag 'gcc/gimple-expr.cc:mark_addressable_2' as 'static' (was: [PR67891] drop is_gimple_reg test from set_parm_rtl)

Message ID 871qr6ire8.fsf@euler.schwinge.homeip.net
State Committed
Headers
Series Tag 'gcc/gimple-expr.cc:mark_addressable_2' as 'static' (was: [PR67891] drop is_gimple_reg test from set_parm_rtl) |

Commit Message

Thomas Schwinge Oct. 17, 2022, 12:08 p.m. UTC
  Hi!

On 2015-11-03T02:29:41-0200, Alexandre Oliva <aoliva@redhat.com> wrote:
> Thanks, here's the patch as just installed.

> --- a/gcc/gimple-expr.c
> +++ b/gcc/gimple-expr.c

> +static void
> +mark_addressable_1 (tree x)
> +{
> +  [...]
> +}
> +
> +/* Adaptor for mark_addressable_1 for use in hash_set traversal.  */
> +
> +bool
> +mark_addressable_2 (tree const &x, void * ATTRIBUTE_UNUSED = NULL)
> +{
> +  mark_addressable_1 (x);
> +  return false;
> +}

Found already a while ago, now pushed to master branch in
commit aeb1e2bff95ae17717026905ef404699d91f5c61
"Tag 'gcc/gimple-expr.cc:mark_addressable_2' as 'static'", see attached.


Grüße
 Thomas


> +void
> +flush_mark_addressable_queue ()
> +{
> +  gcc_assert (!currently_expanding_to_rtl);
> +  if (mark_addressable_queue)
> +    {
> +      mark_addressable_queue->traverse<void*, mark_addressable_2> (NULL);
> +      delete mark_addressable_queue;
> +      mark_addressable_queue = NULL;
> +    }
> +}

> --- a/gcc/gimple-expr.h
> +++ b/gcc/gimple-expr.h

> +extern void flush_mark_addressable_queue (void);


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
  

Patch

From aeb1e2bff95ae17717026905ef404699d91f5c61 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Wed, 15 Dec 2021 22:00:53 +0100
Subject: [PATCH] Tag 'gcc/gimple-expr.cc:mark_addressable_2' as 'static'

Added in 2015 r229696 (commit 1b223a9f3489296c625bdb7cc764196d04fd9231)
"defer mark_addressable calls during expand till the end of expand",
it has never been used 'extern'ally.

	gcc/
	* gimple-expr.cc (mark_addressable_2): Tag as 'static'.
---
 gcc/gimple-expr.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/gimple-expr.cc b/gcc/gimple-expr.cc
index c9c7285efbc..4fbce9369c7 100644
--- a/gcc/gimple-expr.cc
+++ b/gcc/gimple-expr.cc
@@ -912,7 +912,7 @@  mark_addressable_1 (tree x)
 
 /* Adaptor for mark_addressable_1 for use in hash_set traversal.  */
 
-bool
+static bool
 mark_addressable_2 (tree const &x, void * ATTRIBUTE_UNUSED = NULL)
 {
   mark_addressable_1 (x);
-- 
2.35.1