public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/casm-state)] Move casm state initialization later.
@ 2021-09-08 9:28 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-09-08 9:28 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9fdd204b106de916270404f075d741054b40d27b
commit 9fdd204b106de916270404f075d741054b40d27b
Author: Martin Liska <mliska@suse.cz>
Date: Wed Sep 8 10:21:03 2021 +0200
Move casm state initialization later.
Diff:
---
gcc/lto/lto.c | 2 ++
gcc/toplev.c | 9 +++++----
gcc/toplev.h | 2 ++
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 5903f75ac23..6d081d27f53 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -648,6 +648,8 @@ lto_main (void)
debug_hooks->early_finish ("<artificial>");
debuginfo_early_stop ();
+ init_asm_output (main_input_filename);
+
/* Let the middle end know that we have read and merged all of
the input files. */
symtab->compile ();
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 14d1335e79e..319d9e14481 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -108,7 +108,6 @@ static void do_compile ();
static void process_options (void);
static void backend_init (void);
static int lang_dependent_init (const char *);
-static void init_asm_output (const char *);
static void finalize (bool);
static void crash_signal (int) ATTRIBUTE_NORETURN;
@@ -468,6 +467,10 @@ compile_file (void)
if (flag_syntax_only || flag_wpa)
return;
+
+ /* Initialize asm output stream after PCH restore happens. */
+ if (!in_lto_p)
+ init_asm_output (main_input_filename);
/* Reset maximum_field_alignment, it can be adjusted by #pragma pack
and this shouldn't influence any types built by the middle-end
@@ -692,7 +695,7 @@ print_version (FILE *file, const char *indent, bool show_global_state)
on, because then the driver will have provided the name of a
temporary file or bit bucket for us. NAME is the file specified on
the command line, possibly NULL. */
-static void
+void
init_asm_output (const char *name)
{
if (name == NULL && asm_file_name == 0)
@@ -1924,8 +1927,6 @@ lang_dependent_init (const char *name)
if (!flag_wpa)
{
- init_asm_output (name);
-
if (!flag_generate_lto && !flag_compare_debug)
{
/* If stack usage information is desired, open the output file. */
diff --git a/gcc/toplev.h b/gcc/toplev.h
index f543554b15f..27dd0da02bf 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -98,4 +98,6 @@ extern void parse_alignment_opts (void);
extern void initialize_rtl (void);
+extern void init_asm_output (const char *);
+
#endif /* ! GCC_TOPLEV_H */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-08 9:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 9:28 [gcc(refs/users/marxin/heads/casm-state)] Move casm state initialization later Martin Liska
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).