public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-2347] GGC: Remove unused 'bool is_string' arguments to 'ggc_pch_{count, alloc, write}_object'
Date: Thu,  6 Jul 2023 10:03:25 +0000 (GMT)	[thread overview]
Message-ID: <20230706100325.9994C3858D33@sourceware.org> (raw)

https://gcc.gnu.org/g:bbbe2dc1fc4f561cda3d8cb383132b7d519b0de8

commit r14-2347-gbbbe2dc1fc4f561cda3d8cb383132b7d519b0de8
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Sat Jul 1 00:25:05 2023 +0200

    GGC: Remove unused 'bool is_string' arguments to 'ggc_pch_{count,alloc,write}_object'
    
    They're unused since the removal of 'gcc/ggc-zone.c' in 2013 Subversion r195426
    (Git commit cd030c079e5e42fe3f49261fe01f384e6b7f0111) "Remove zone allocator".
    
    Should any future 'gcc/ggc-[...].cc' ever need this again, it'll be a conscious
    decision at that time.
    
            gcc/
            * ggc-internal.h (ggc_pch_count_object, ggc_pch_alloc_object)
            (ggc_pch_write_object): Remove 'bool is_string' argument.
            * ggc-common.cc: Adjust.
            * ggc-page.cc: Likewise.

Diff:
---
 gcc/ggc-common.cc  |  9 +++------
 gcc/ggc-internal.h | 15 ++++++---------
 gcc/ggc-page.cc    |  6 +++---
 3 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/gcc/ggc-common.cc b/gcc/ggc-common.cc
index db317f49993..173ab64cb73 100644
--- a/gcc/ggc-common.cc
+++ b/gcc/ggc-common.cc
@@ -336,8 +336,7 @@ ggc_call_count (ptr_data **slot, traversal_state *state)
 {
   struct ptr_data *d = *slot;
 
-  ggc_pch_count_object (state->d, d->obj, d->size,
-			d->note_ptr_fn == gt_pch_p_S);
+  ggc_pch_count_object (state->d, d->obj, d->size);
   state->count++;
   return 1;
 }
@@ -347,8 +346,7 @@ ggc_call_alloc (ptr_data **slot, traversal_state *state)
 {
   struct ptr_data *d = *slot;
 
-  d->new_addr = ggc_pch_alloc_object (state->d, d->obj, d->size,
-				      d->note_ptr_fn == gt_pch_p_S);
+  d->new_addr = ggc_pch_alloc_object (state->d, d->obj, d->size);
   state->ptrs[state->ptrs_i++] = d;
   return 1;
 }
@@ -642,8 +640,7 @@ gt_pch_save (FILE *f)
 				  state.ptrs[i]->note_ptr_cookie,
 				  relocate_ptrs, &state);
       ggc_pch_write_object (state.d, state.f, state.ptrs[i]->obj,
-			    state.ptrs[i]->new_addr, state.ptrs[i]->size,
-			    state.ptrs[i]->note_ptr_fn == gt_pch_p_S);
+			    state.ptrs[i]->new_addr, state.ptrs[i]->size);
       if (state.ptrs[i]->note_ptr_fn != gt_pch_p_S)
 	memcpy (state.ptrs[i]->obj, this_object, state.ptrs[i]->size);
 #if defined ENABLE_VALGRIND_ANNOTATIONS && defined VALGRIND_GET_VBITS
diff --git a/gcc/ggc-internal.h b/gcc/ggc-internal.h
index 25e6ce66ebc..33874bcec99 100644
--- a/gcc/ggc-internal.h
+++ b/gcc/ggc-internal.h
@@ -52,9 +52,8 @@ extern struct ggc_pch_data *init_ggc_pch (void);
 
 /* The second parameter and third parameters give the address and size
    of an object.  Update the ggc_pch_data structure with as much of
-   that information as is necessary. The bool argument should be true
-   if the object is a string.  */
-extern void ggc_pch_count_object (struct ggc_pch_data *, void *, size_t, bool);
+   that information as is necessary.  */
+extern void ggc_pch_count_object (struct ggc_pch_data *, void *, size_t);
 
 /* Return the total size of the data to be written to hold all
    the objects previously passed to ggc_pch_count_object.  */
@@ -65,17 +64,15 @@ extern size_t ggc_pch_total_size (struct ggc_pch_data *);
 extern void ggc_pch_this_base (struct ggc_pch_data *, void *);
 
 /* Assuming that the objects really do end up at the address
-   passed to ggc_pch_this_base, return the address of this object.
-   The bool argument should be true if the object is a string.  */
-extern char *ggc_pch_alloc_object (struct ggc_pch_data *, void *, size_t, bool);
+   passed to ggc_pch_this_base, return the address of this object.  */
+extern char *ggc_pch_alloc_object (struct ggc_pch_data *, void *, size_t);
 
 /* Write out any initial information required.  */
 extern void ggc_pch_prepare_write (struct ggc_pch_data *, FILE *);
 
-/* Write out this object, including any padding.  The last argument should be
-   true if the object is a string.  */
+/* Write out this object, including any padding.  */
 extern void ggc_pch_write_object (struct ggc_pch_data *, FILE *, void *,
-				  void *, size_t, bool);
+				  void *, size_t);
 
 /* All objects have been written, write out any final information
    required.  */
diff --git a/gcc/ggc-page.cc b/gcc/ggc-page.cc
index 2f0b72e1b22..b74572cae4f 100644
--- a/gcc/ggc-page.cc
+++ b/gcc/ggc-page.cc
@@ -2409,7 +2409,7 @@ init_ggc_pch (void)
 
 void
 ggc_pch_count_object (struct ggc_pch_data *d, void *x ATTRIBUTE_UNUSED,
-		      size_t size, bool is_string ATTRIBUTE_UNUSED)
+		      size_t size)
 {
   unsigned order;
 
@@ -2452,7 +2452,7 @@ ggc_pch_this_base (struct ggc_pch_data *d, void *base)
 
 char *
 ggc_pch_alloc_object (struct ggc_pch_data *d, void *x ATTRIBUTE_UNUSED,
-		      size_t size, bool is_string ATTRIBUTE_UNUSED)
+		      size_t size)
 {
   unsigned order;
   char *result;
@@ -2481,7 +2481,7 @@ ggc_pch_prepare_write (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
 void
 ggc_pch_write_object (struct ggc_pch_data *d,
 		      FILE *f, void *x, void *newx ATTRIBUTE_UNUSED,
-		      size_t size, bool is_string ATTRIBUTE_UNUSED)
+		      size_t size)
 {
   unsigned order;
   static const char emptyBytes[256] = { 0 };

                 reply	other threads:[~2023-07-06 10:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230706100325.9994C3858D33@sourceware.org \
    --to=tschwinge@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).