public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5215] Fix ipa-pure-const
@ 2021-11-12 19:16 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2021-11-12 19:16 UTC (permalink / raw)
  To: gcc-cvs

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

commit r12-5215-gb301cb43a795884884977703a3767e8765d193d1
Author: Jan Hubicka <jh@suse.cz>
Date:   Fri Nov 12 20:15:48 2021 +0100

    Fix ipa-pure-const
    
    gcc/ChangeLog:
    
            * ipa-pure-const.c (propagate_pure_const): Remove redundant check;
            fix call of ipa_make_function_const and ipa_make_function_pure.

Diff:
---
 gcc/ipa-pure-const.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index b831844afa6..5056850c0a8 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -1611,9 +1611,6 @@ propagate_pure_const (void)
 	      enum pure_const_state_e edge_state = IPA_CONST;
 	      bool edge_looping = false;
 
-	      if (e->recursive_p ())
-		looping = true;
-
 	      if (e->recursive_p ())
 		looping = true;
 
@@ -1800,11 +1797,11 @@ propagate_pure_const (void)
 	    switch (this_state)
 	      {
 	      case IPA_CONST:
-		remove_p |= ipa_make_function_const (node, looping, false);
+		remove_p |= ipa_make_function_const (node, this_looping, false);
 		break;
 
 	      case IPA_PURE:
-		remove_p |= ipa_make_function_pure (node, looping, false);
+		remove_p |= ipa_make_function_pure (node, this_looping, false);
 		break;
 
 	      default:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-12 19:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 19:16 [gcc r12-5215] Fix ipa-pure-const Jan Hubicka

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