On 11/19/19 1:42 PM, Richard Biener wrote:
Well, then call it from the caller of init_options_struct instead, right after it or after the langhook variant is called?
Yes, that's definitely possible, there's a patch that I've just locally tested. Ready for trunk? Thanks, Martin
>From b868170d585354e3cfedb4b6076ec66d475fa66d Mon Sep 17 00:00:00 2001 From: Martin Liska <mli...@suse.cz> Date: Tue, 19 Nov 2019 13:55:40 +0100 Subject: [PATCH] Restore init_ggc_heuristics. gcc/ChangeLog: 2019-11-19 Martin Liska <mli...@suse.cz> * toplev.c (general_init): Move the call... (toplev::main): ... here as we need init_options_struct being called. --- gcc/toplev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/toplev.c b/gcc/toplev.c index d4583bac66c..cfc757d84ba 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1240,10 +1240,6 @@ general_init (const char *argv0, bool init_signals) /* Initialize register usage now so switches may override. */ init_reg_sets (); - /* This must be done after global_init_params but before argument - processing. */ - init_ggc_heuristics (); - /* Create the singleton holder for global state. This creates the dump manager. */ g = new gcc::context (); @@ -2377,6 +2373,10 @@ toplev::main (int argc, char **argv) init_options_struct (&global_options, &global_options_set); lang_hooks.init_options_struct (&global_options); + /* Init GGC heuristics must be caller after we initialize + options. */ + init_ggc_heuristics (); + /* Convert the options to an array. */ decode_cmdline_options_to_array_default_mask (argc, CONST_CAST2 (const char **, -- 2.24.0