This patch removes a dead if statement checking for gomp-parallel gimple
statements. This if is in the execute method of build_cgraph_edges pass,
which is executed right after the omp_expand pass, which removes these
gimple statements and replaces them with simple gcalls, making this if
practically dead. 

Some TSan tests are failing with this patch, but I don't think this
change is likely to cause these failures. Additionally, the failures are
not consistent across runs, making me think these failures are a
bug in TSan itself. All other tests are ok. Tested on x86_64-pc-linux-gnu. 

OK for master ?

gcc/ChangeLog:

        * cgraphbuild.cc (pass_build_cgraph_edges::execute): remove if
          statement checking for gomp-parallel statements

Signed-off-by: Josef Melcr <melcr...@fit.cvut.cz>
---
 gcc/cgraphbuild.cc | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/gcc/cgraphbuild.cc b/gcc/cgraphbuild.cc
index 8852ba9ee92..191ec1077e4 100644
--- a/gcc/cgraphbuild.cc
+++ b/gcc/cgraphbuild.cc
@@ -340,12 +340,6 @@ pass_build_cgraph_edges::execute (function *fun)
                                            bb->count);
            }
          node->record_stmt_references (stmt);
-         if (gomp_parallel *omp_par_stmt = dyn_cast <gomp_parallel *> (stmt))
-           {
-             tree fn = gimple_omp_parallel_child_fn (omp_par_stmt);
-             node->create_reference (cgraph_node::get_create (fn),
-                                     IPA_REF_ADDR, stmt);
-           }
          if (gimple_code (stmt) == GIMPLE_OMP_TASK)
            {
              tree fn = gimple_omp_task_child_fn (stmt);
-- 
2.47.0

Reply via email to