This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Enable init_ggc_heuristics for ENABLE_GC_CHECKING.
One potential improvement is to enable the heuristics
for ENABLE_GC_CHECKING. The macro is about sanity checking
and poisoning of GGC memory. Which seems to me completely
independent to setting of the default parameters.
Ready to be installed?
Thanks,
Martin
>From e0eab3674caedfcd5b332a335f513c501ab8dfb4 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Tue, 19 Nov 2019 09:09:05 +0100
Subject: [PATCH] Enable init_ggc_heuristics for ENABLE_GC_CHECKING.
gcc/ChangeLog:
2019-11-19 Martin Liska <mliska@suse.cz>
* opts.c: Enable init_ggc_heuristics for situation
when ENABLE_GC_CHECKING is enabled.
---
gcc/opts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/opts.c b/gcc/opts.c
index 7e363e5c1d6..3c197bc2f76 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -275,7 +275,7 @@ init_opts_obstack (void)
gcc_obstack_init (&opts_obstack);
}
-#if !defined ENABLE_GC_CHECKING && !defined ENABLE_GC_ALWAYS_COLLECT
+#if !defined ENABLE_GC_ALWAYS_COLLECT
/* Modify the bound based on rlimits. */
@@ -373,7 +373,7 @@ ggc_min_heapsize_heuristic (void)
static void
init_ggc_heuristics (void)
{
-#if !defined ENABLE_GC_CHECKING && !defined ENABLE_GC_ALWAYS_COLLECT
+#if !defined ENABLE_GC_ALWAYS_COLLECT
param_ggc_min_expand = ggc_min_expand_heuristic ();
param_ggc_min_heapsize = ggc_min_heapsize_heuristic ();
#endif
--
2.24.0