https://gcc.gnu.org/g:96b5b1e30b6520d94702c1d2f18d18f2a1a05ad6

commit 96b5b1e30b6520d94702c1d2f18d18f2a1a05ad6
Author: Josef Melcr <melcr...@fit.cvut.cz>
Date:   Tue Oct 22 19:24:01 2024 +0200

    omp-cp: add analysis done check when recursing in ipa_analyze_node
    
    gcc/ChangeLog:
    
            * ipa-prop.cc (ipa_analyze_node): add analysis done check when 
recursing
    
    Signed-off-by: Josef Melcr <melcr...@fit.cvut.cz>

Diff:
---
 gcc/ipa-prop.cc | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc
index 2089bb64cf0e..2cc72755eb56 100644
--- a/gcc/ipa-prop.cc
+++ b/gcc/ipa-prop.cc
@@ -3204,10 +3204,16 @@ ipa_analyze_node (struct cgraph_node *node)
              cgraph_node * reffering_node = dyn_cast<cgraph_node 
*>(ref->referring);
              gcc_checking_assert(call_stmt);
              gcc_checking_assert(reffering_node);
-        cgraph_edge * e = reffering_node->get_edge(ref->stmt);
-        e->make_callback(node);
-        ipa_analyze_node(e->caller);
-           }
+             cgraph_edge *e = reffering_node->get_edge (ref->stmt);
+             e->make_callback (node);
+             ipa_node_params *caller_info
+               = ipa_node_params_sum->get_create (e->caller);
+             if (caller_info->analysis_done)
+               {
+                 caller_info->analysis_done = 0;
+                 ipa_analyze_node (e->caller);
+               }
+             }
        }
     }

Reply via email to