[1/5] Do not overuse push/pop_cfun in IPA ICF.
diff mbox series

Message ID 1bb908adb191b1855328e1e38825b367f74746a7.1573636740.git.mliska@suse.cz
State New
Headers show
Series
  • IPA ICF: more clean up
Related show

Commit Message

Martin Liška Nov. 8, 2019, 7:07 a.m. UTC
gcc/ChangeLog:

2019-11-11  Martin Liska  <mliska@suse.cz>

	* ipa-icf.c (sem_function::equals_private): Do not overuse
	push/pop_cfun functions.
---
 gcc/ipa-icf.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Richard Biener Nov. 13, 2019, 1:40 p.m. UTC | #1
On Wed, Nov 13, 2019 at 10:22 AM Martin Liska <mliska@suse.cz> wrote:
>

OK.

> gcc/ChangeLog:
>
> 2019-11-11  Martin Liska  <mliska@suse.cz>
>
>         * ipa-icf.c (sem_function::equals_private): Do not overuse
>         push/pop_cfun functions.
> ---
>  gcc/ipa-icf.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>

Patch
diff mbox series

diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 10aa4b76463..53e387403c8 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -877,14 +877,9 @@  sem_function::equals_private (sem_item *item)
     }
 
   /* Checking all basic blocks.  */
-  push_cfun (DECL_STRUCT_FUNCTION (decl));
   for (unsigned i = 0; i < bb_sorted.length (); ++i)
     if(!m_checker->compare_bb (bb_sorted[i], m_compared_func->bb_sorted[i]))
-      {
-	pop_cfun ();
-	return return_false ();
-      }
-  pop_cfun ();
+      return return_false ();
 
   auto_vec <int> bb_dict;