aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pass.h
diff options
context:
space:
mode:
authorTobias Burnus <tburnus@baylibre.com>2024-09-03 12:02:23 +0200
committerTobias Burnus <tburnus@baylibre.com>2024-09-03 12:02:23 +0200
commit2fcccf21a34f92ea060b492c9b2aecb56cd5d167 (patch)
tree9f218e7d29ef9a1a9a67cf050309894118091d40 /gcc/tree-pass.h
parentce5f2dc45038c9806088132cc923b13719f48732 (diff)
downloadgcc-2fcccf21a34f92ea060b492c9b2aecb56cd5d167.zip
gcc-2fcccf21a34f92ea060b492c9b2aecb56cd5d167.tar.gz
gcc-2fcccf21a34f92ea060b492c9b2aecb56cd5d167.tar.bz2
LTO/WPA: Ensure that output_offload_tables only writes table once [PR116535]
When ltrans was written concurrently, e.g. via -flto=N (N > 1, assuming sufficient partiations, e.g., via -flto-partition=max), output_offload_tables wrote the output tables once per fork. PR lto/116535 gcc/ChangeLog: * lto-cgraph.cc (output_offload_tables): Remove offload_ frees. * lto-streamer-out.cc (lto_output): Make call to it depend on lto_get_out_decl_state ()->output_offload_tables_p. * lto-streamer.h (struct lto_out_decl_state): Add output_offload_tables_p field. * tree-pass.h (ipa_write_optimization_summaries): Add bool argument. * passes.cc (ipa_write_summaries_1): Add bool output_offload_tables_p arg. (ipa_write_summaries): Update call. (ipa_write_optimization_summaries): Accept output_offload_tables_p. gcc/lto/ChangeLog: * lto.cc (stream_out): Update call to ipa_write_optimization_summaries to pass true for first partition.
Diffstat (limited to 'gcc/tree-pass.h')
-rw-r--r--gcc/tree-pass.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 3a0cf13..a928cbe 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -684,7 +684,8 @@ extern void emergency_dump_function (void);
extern void print_current_pass (FILE *);
extern void debug_pass (void);
extern void ipa_write_summaries (void);
-extern void ipa_write_optimization_summaries (struct lto_symtab_encoder_d *);
+extern void ipa_write_optimization_summaries (struct lto_symtab_encoder_d *,
+ bool);
extern void ipa_read_summaries (void);
extern void ipa_read_optimization_summaries (void);
extern void register_one_dump_file (opt_pass *);