* [PATCH] lto/106334 - fix previous fix wrt -flto-partition=none
@ 2022-08-02 6:34 Richard Biener
0 siblings, 0 replies; 3+ messages in thread
From: Richard Biener @ 2022-08-02 6:34 UTC (permalink / raw)
To: gcc-patches
This adjusts the assert guard to include -flto-partition=none which
behaves as WPA.
Bootstrapped & tested on x86_64-unknown-linux-gnu, pushed.
PR lto/106334
* dwarf2out.cc (dwarf2out_register_external_die): Adjust
assert.
---
gcc/dwarf2out.cc | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 3ac39c1a5b0..cfea9cf6451 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -6069,11 +6069,12 @@ dwarf2out_register_external_die (tree decl, const char *sym,
if (!external_die_map)
external_die_map = hash_map<tree, sym_off_pair>::create_ggc (1000);
- /* When we do tree merging during WPA we can end up re-using GC memory
- as there's currently no way to unregister external DIEs. Ideally
- we'd register them only after merging finished but allowing override
- here is easiest. See PR106334. */
- gcc_checking_assert (flag_wpa || !external_die_map->get (decl));
+ /* When we do tree merging during WPA or with -flto-partition=none we
+ can end up re-using GC memory as there's currently no way to unregister
+ external DIEs. Ideally we'd register them only after merging finished
+ but allowing override here is easiest. See PR106334. */
+ gcc_checking_assert (!(in_lto_p && !flag_wpa)
+ || !external_die_map->get (decl));
sym_off_pair p = { IDENTIFIER_POINTER (get_identifier (sym)), off };
external_die_map->put (decl, p);
}
--
2.35.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] lto/106334 - fix previous fix wrt -flto-partition=none
@ 2022-08-02 6:34 Richard Biener
0 siblings, 0 replies; 3+ messages in thread
From: Richard Biener @ 2022-08-02 6:34 UTC (permalink / raw)
To: gcc-patches
This adjusts the assert guard to include -flto-partition=none which
behaves as WPA.
Bootstrapped & tested on x86_64-unknown-linux-gnu, pushed.
PR lto/106334
* dwarf2out.cc (dwarf2out_register_external_die): Adjust
assert.
---
gcc/dwarf2out.cc | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 3ac39c1a5b0..cfea9cf6451 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -6069,11 +6069,12 @@ dwarf2out_register_external_die (tree decl, const char *sym,
if (!external_die_map)
external_die_map = hash_map<tree, sym_off_pair>::create_ggc (1000);
- /* When we do tree merging during WPA we can end up re-using GC memory
- as there's currently no way to unregister external DIEs. Ideally
- we'd register them only after merging finished but allowing override
- here is easiest. See PR106334. */
- gcc_checking_assert (flag_wpa || !external_die_map->get (decl));
+ /* When we do tree merging during WPA or with -flto-partition=none we
+ can end up re-using GC memory as there's currently no way to unregister
+ external DIEs. Ideally we'd register them only after merging finished
+ but allowing override here is easiest. See PR106334. */
+ gcc_checking_assert (!(in_lto_p && !flag_wpa)
+ || !external_die_map->get (decl));
sym_off_pair p = { IDENTIFIER_POINTER (get_identifier (sym)), off };
external_die_map->put (decl, p);
}
--
2.35.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] lto/106334 - fix previous fix wrt -flto-partition=none
@ 2022-08-02 6:34 Richard Biener
0 siblings, 0 replies; 3+ messages in thread
From: Richard Biener @ 2022-08-02 6:34 UTC (permalink / raw)
To: gcc-patches
This adjusts the assert guard to include -flto-partition=none which
behaves as WPA.
Bootstrapped & tested on x86_64-unknown-linux-gnu, pushed.
PR lto/106334
* dwarf2out.cc (dwarf2out_register_external_die): Adjust
assert.
---
gcc/dwarf2out.cc | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 3ac39c1a5b0..cfea9cf6451 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -6069,11 +6069,12 @@ dwarf2out_register_external_die (tree decl, const char *sym,
if (!external_die_map)
external_die_map = hash_map<tree, sym_off_pair>::create_ggc (1000);
- /* When we do tree merging during WPA we can end up re-using GC memory
- as there's currently no way to unregister external DIEs. Ideally
- we'd register them only after merging finished but allowing override
- here is easiest. See PR106334. */
- gcc_checking_assert (flag_wpa || !external_die_map->get (decl));
+ /* When we do tree merging during WPA or with -flto-partition=none we
+ can end up re-using GC memory as there's currently no way to unregister
+ external DIEs. Ideally we'd register them only after merging finished
+ but allowing override here is easiest. See PR106334. */
+ gcc_checking_assert (!(in_lto_p && !flag_wpa)
+ || !external_die_map->get (decl));
sym_off_pair p = { IDENTIFIER_POINTER (get_identifier (sym)), off };
external_die_map->put (decl, p);
}
--
2.35.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-02 6:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 6:34 [PATCH] lto/106334 - fix previous fix wrt -flto-partition=none Richard Biener
-- strict thread matches above, loose matches on Subject: below --
2022-08-02 6:34 Richard Biener
2022-08-02 6:34 Richard Biener
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).