public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-4085] doc: GTY((cache)) documentation tweak
Date: Mon, 18 Sep 2023 03:40:38 +0000 (GMT) [thread overview]
Message-ID: <20230918034038.6389C3857712@sourceware.org> (raw)
https://gcc.gnu.org/g:93996cfb308ffc633a23d0f1b72bcdc086bed864
commit r14-4085-g93996cfb308ffc633a23d0f1b72bcdc086bed864
Author: Jason Merrill <jason@redhat.com>
Date: Fri Sep 8 11:27:26 2023 -0400
doc: GTY((cache)) documentation tweak
gcc/ChangeLog:
* doc/gty.texi: Add discussion of cache vs. deletable.
Diff:
---
gcc/doc/gty.texi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/doc/gty.texi b/gcc/doc/gty.texi
index 15f9fa07405..1dfe4652644 100644
--- a/gcc/doc/gty.texi
+++ b/gcc/doc/gty.texi
@@ -306,6 +306,13 @@ called on that variable between the mark and sweep phases of garbage
collection. The gt_clear_cache function is free to mark blocks as used, or to
clear pointers in the variable.
+In a hash table, the @samp{gt_cleare_cache} function discards entries
+if the key is not marked, or marks the value if the key is marked.
+
+Note that caches should generally use @code{deletable} instead;
+@code{cache} is only preferable if the value is impractical to
+recompute from the key when needed.
+
@findex deletable
@item deletable
reply other threads:[~2023-09-18 3:40 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=20230918034038.6389C3857712@sourceware.org \
--to=jason@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).