Re: [PATCH] cgraph: remove dead if stmt in build_cgraph_edges pass

2024-11-03 Thread Josef Melcr
Hi, I've looked at the statements slipping through and they are all atomic loads and stores. What I find strange is these statements don't get expanded only in tests for errors, when the code is not supposed to compile. In all other cases all statements get expanded just fine, including atomi

Re: [PATCH] cgraph: remove dead if stmt in build_cgraph_edges pass

2024-10-24 Thread Jakub Jelinek
On Thu, Oct 24, 2024 at 04:37:24PM +0200, Josef Melcr wrote: > 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 statem

Re: [PATCH] cgraph: remove dead if stmt in build_cgraph_edges pass

2024-10-24 Thread Josef Melcr
So I experimented a little and ran the testsuite a few times. While both if statements seem to be dead, the assertion gcc_checking_assert (!is_gimple_omp (stmt)) doesn't actually hold, as adding this assert breaks around 40 omp/oacc tests, so some other statements are definitely slipping throug

Re: [PATCH] cgraph: remove dead if stmt in build_cgraph_edges pass

2024-10-24 Thread Josef Melcr
Capital Remove The second line should be just tab indented, not tab + 2 spaces, and finished with dot. gomp_parallel rather than gomp-parallel. Sorry about the formatting issues, I didn't notice them. The if (gimple_code (stmt) == GIMPLE_OMP_TASK) case should go as well. Wonder if gcc_checking

[PATCH] cgraph: remove dead if stmt in build_cgraph_edges pass

2024-10-24 Thread Josef Melcr
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