public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] strub: preserve comdat group
@ 2023-06-08 10:44 Alexandre Oliva
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Oliva @ 2023-06-08 10:44 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c88244498fe1667381145c1fadee8d79bfe1f2c0

commit c88244498fe1667381145c1fadee8d79bfe1f2c0
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Jun 8 07:41:02 2023 -0300

    strub: preserve comdat group

Diff:
---
 gcc/cgraph.h      | 2 +-
 gcc/cgraphunit.cc | 5 +++--
 gcc/ipa-strub.cc  | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index cedaaac3a45..177bd9dc5b7 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -153,7 +153,7 @@ public:
   void remove (void);
 
   /* Undo any definition or use of the symbol.  */
-  void reset (void);
+  void reset (bool preserve_comdat_group = false);
 
   /* Dump symtab node to F.  */
   void dump (FILE *f);
diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc
index bccd2f2abb5..9a550a5cce6 100644
--- a/gcc/cgraphunit.cc
+++ b/gcc/cgraphunit.cc
@@ -384,7 +384,7 @@ symbol_table::process_new_functions (void)
    functions or variables.  */
 
 void
-symtab_node::reset (void)
+symtab_node::reset (bool preserve_comdat_group)
 {
   /* Reset our data structures so we can analyze the function again.  */
   analyzed = false;
@@ -395,7 +395,8 @@ symtab_node::reset (void)
   cpp_implicit_alias = false;
 
   remove_all_references ();
-  remove_from_same_comdat_group ();
+  if (!preserve_comdat_group)
+    remove_from_same_comdat_group ();
 
   if (cgraph_node *cn = dyn_cast <cgraph_node *> (this))
     {
diff --git a/gcc/ipa-strub.cc b/gcc/ipa-strub.cc
index 921e4eb05ac..73a8771315c 100644
--- a/gcc/ipa-strub.cc
+++ b/gcc/ipa-strub.cc
@@ -2902,7 +2902,7 @@ pass_ipa_strub::execute (function *)
 	/* Remove the function's body but keep arguments to be reused
 	   for thunk.  */
 	onode->release_body (true);
-	onode->reset ();
+	onode->reset (/* unlike create_wrapper: preserve_comdat_group = */true);
 
 	DECL_UNINLINABLE (decl) = false;
 	DECL_RESULT (decl) = decl_result;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] strub: preserve comdat group
@ 2023-06-09  8:08 Alexandre Oliva
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Oliva @ 2023-06-09  8:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:85e51993e5844b993728548138d0706481b45dab

commit 85e51993e5844b993728548138d0706481b45dab
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Jun 8 07:41:02 2023 -0300

    strub: preserve comdat group

Diff:
---
 gcc/cgraph.h      | 2 +-
 gcc/cgraphunit.cc | 5 +++--
 gcc/ipa-strub.cc  | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index f5f54769eda..6277d6e7134 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -153,7 +153,7 @@ public:
   void remove (void);
 
   /* Undo any definition or use of the symbol.  */
-  void reset (void);
+  void reset (bool preserve_comdat_group = false);
 
   /* Dump symtab node to F.  */
   void dump (FILE *f);
diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc
index bccd2f2abb5..9a550a5cce6 100644
--- a/gcc/cgraphunit.cc
+++ b/gcc/cgraphunit.cc
@@ -384,7 +384,7 @@ symbol_table::process_new_functions (void)
    functions or variables.  */
 
 void
-symtab_node::reset (void)
+symtab_node::reset (bool preserve_comdat_group)
 {
   /* Reset our data structures so we can analyze the function again.  */
   analyzed = false;
@@ -395,7 +395,8 @@ symtab_node::reset (void)
   cpp_implicit_alias = false;
 
   remove_all_references ();
-  remove_from_same_comdat_group ();
+  if (!preserve_comdat_group)
+    remove_from_same_comdat_group ();
 
   if (cgraph_node *cn = dyn_cast <cgraph_node *> (this))
     {
diff --git a/gcc/ipa-strub.cc b/gcc/ipa-strub.cc
index 921e4eb05ac..73a8771315c 100644
--- a/gcc/ipa-strub.cc
+++ b/gcc/ipa-strub.cc
@@ -2902,7 +2902,7 @@ pass_ipa_strub::execute (function *)
 	/* Remove the function's body but keep arguments to be reused
 	   for thunk.  */
 	onode->release_body (true);
-	onode->reset ();
+	onode->reset (/* unlike create_wrapper: preserve_comdat_group = */true);
 
 	DECL_UNINLINABLE (decl) = false;
 	DECL_RESULT (decl) = decl_result;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] strub: preserve comdat group
@ 2023-06-09  6:26 Alexandre Oliva
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Oliva @ 2023-06-09  6:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7ab0449e9802ca7edb0d929fe161b56fd98eceaa

commit 7ab0449e9802ca7edb0d929fe161b56fd98eceaa
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Jun 8 07:41:02 2023 -0300

    strub: preserve comdat group

Diff:
---
 gcc/cgraph.h      | 2 +-
 gcc/cgraphunit.cc | 5 +++--
 gcc/ipa-strub.cc  | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index f5f54769eda..6277d6e7134 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -153,7 +153,7 @@ public:
   void remove (void);
 
   /* Undo any definition or use of the symbol.  */
-  void reset (void);
+  void reset (bool preserve_comdat_group = false);
 
   /* Dump symtab node to F.  */
   void dump (FILE *f);
diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc
index bccd2f2abb5..9a550a5cce6 100644
--- a/gcc/cgraphunit.cc
+++ b/gcc/cgraphunit.cc
@@ -384,7 +384,7 @@ symbol_table::process_new_functions (void)
    functions or variables.  */
 
 void
-symtab_node::reset (void)
+symtab_node::reset (bool preserve_comdat_group)
 {
   /* Reset our data structures so we can analyze the function again.  */
   analyzed = false;
@@ -395,7 +395,8 @@ symtab_node::reset (void)
   cpp_implicit_alias = false;
 
   remove_all_references ();
-  remove_from_same_comdat_group ();
+  if (!preserve_comdat_group)
+    remove_from_same_comdat_group ();
 
   if (cgraph_node *cn = dyn_cast <cgraph_node *> (this))
     {
diff --git a/gcc/ipa-strub.cc b/gcc/ipa-strub.cc
index 921e4eb05ac..73a8771315c 100644
--- a/gcc/ipa-strub.cc
+++ b/gcc/ipa-strub.cc
@@ -2902,7 +2902,7 @@ pass_ipa_strub::execute (function *)
 	/* Remove the function's body but keep arguments to be reused
 	   for thunk.  */
 	onode->release_body (true);
-	onode->reset ();
+	onode->reset (/* unlike create_wrapper: preserve_comdat_group = */true);
 
 	DECL_UNINLINABLE (decl) = false;
 	DECL_RESULT (decl) = decl_result;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] strub: preserve comdat group
@ 2023-06-09  6:18 Alexandre Oliva
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Oliva @ 2023-06-09  6:18 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:91627f2c213d2c5b5e08c9144959b205b6e56676

commit 91627f2c213d2c5b5e08c9144959b205b6e56676
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Jun 8 07:41:02 2023 -0300

    strub: preserve comdat group

Diff:
---
 gcc/cgraph.h      | 2 +-
 gcc/cgraphunit.cc | 5 +++--
 gcc/ipa-strub.cc  | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index f5f54769eda..6277d6e7134 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -153,7 +153,7 @@ public:
   void remove (void);
 
   /* Undo any definition or use of the symbol.  */
-  void reset (void);
+  void reset (bool preserve_comdat_group = false);
 
   /* Dump symtab node to F.  */
   void dump (FILE *f);
diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc
index bccd2f2abb5..9a550a5cce6 100644
--- a/gcc/cgraphunit.cc
+++ b/gcc/cgraphunit.cc
@@ -384,7 +384,7 @@ symbol_table::process_new_functions (void)
    functions or variables.  */
 
 void
-symtab_node::reset (void)
+symtab_node::reset (bool preserve_comdat_group)
 {
   /* Reset our data structures so we can analyze the function again.  */
   analyzed = false;
@@ -395,7 +395,8 @@ symtab_node::reset (void)
   cpp_implicit_alias = false;
 
   remove_all_references ();
-  remove_from_same_comdat_group ();
+  if (!preserve_comdat_group)
+    remove_from_same_comdat_group ();
 
   if (cgraph_node *cn = dyn_cast <cgraph_node *> (this))
     {
diff --git a/gcc/ipa-strub.cc b/gcc/ipa-strub.cc
index 921e4eb05ac..73a8771315c 100644
--- a/gcc/ipa-strub.cc
+++ b/gcc/ipa-strub.cc
@@ -2902,7 +2902,7 @@ pass_ipa_strub::execute (function *)
 	/* Remove the function's body but keep arguments to be reused
 	   for thunk.  */
 	onode->release_body (true);
-	onode->reset ();
+	onode->reset (/* unlike create_wrapper: preserve_comdat_group = */true);
 
 	DECL_UNINLINABLE (decl) = false;
 	DECL_RESULT (decl) = decl_result;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] strub: preserve comdat group
@ 2023-06-08 11:00 Alexandre Oliva
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Oliva @ 2023-06-08 11:00 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8b051050bb83c77b39a8d0b4c5ab07541a4dd0cc

commit 8b051050bb83c77b39a8d0b4c5ab07541a4dd0cc
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Jun 8 07:57:10 2023 -0300

    strub: preserve comdat group

Diff:
---
 gcc/cgraph.h      | 2 +-
 gcc/cgraphunit.cc | 5 +++--
 gcc/ipa-strub.cc  | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index cedaaac3a45..177bd9dc5b7 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -153,7 +153,7 @@ public:
   void remove (void);
 
   /* Undo any definition or use of the symbol.  */
-  void reset (void);
+  void reset (bool preserve_comdat_group = false);
 
   /* Dump symtab node to F.  */
   void dump (FILE *f);
diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc
index bccd2f2abb5..9a550a5cce6 100644
--- a/gcc/cgraphunit.cc
+++ b/gcc/cgraphunit.cc
@@ -384,7 +384,7 @@ symbol_table::process_new_functions (void)
    functions or variables.  */
 
 void
-symtab_node::reset (void)
+symtab_node::reset (bool preserve_comdat_group)
 {
   /* Reset our data structures so we can analyze the function again.  */
   analyzed = false;
@@ -395,7 +395,8 @@ symtab_node::reset (void)
   cpp_implicit_alias = false;
 
   remove_all_references ();
-  remove_from_same_comdat_group ();
+  if (!preserve_comdat_group)
+    remove_from_same_comdat_group ();
 
   if (cgraph_node *cn = dyn_cast <cgraph_node *> (this))
     {
diff --git a/gcc/ipa-strub.cc b/gcc/ipa-strub.cc
index 921e4eb05ac..73a8771315c 100644
--- a/gcc/ipa-strub.cc
+++ b/gcc/ipa-strub.cc
@@ -2902,7 +2902,7 @@ pass_ipa_strub::execute (function *)
 	/* Remove the function's body but keep arguments to be reused
 	   for thunk.  */
 	onode->release_body (true);
-	onode->reset ();
+	onode->reset (/* unlike create_wrapper: preserve_comdat_group = */true);
 
 	DECL_UNINLINABLE (decl) = false;
 	DECL_RESULT (decl) = decl_result;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-09  8:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08 10:44 [gcc(refs/users/aoliva/heads/testme)] strub: preserve comdat group Alexandre Oliva
2023-06-08 11:00 Alexandre Oliva
2023-06-09  6:18 Alexandre Oliva
2023-06-09  6:26 Alexandre Oliva
2023-06-09  8:08 Alexandre Oliva

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).