https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99555

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #15)
> Besides the post-commit comment by Thomas (last comment before mine; comment
> 14),
> there is another issue:
> The commit causes for SPEC HPC2021's 521.miniswp_t (OpenMP) 400% slowdown.

Does it perhaps call omp_get_team_num () too often and is shared var access
slow?
Previously that function was returning an internal register, now it reads a
shared variable because we can't artificially lower number of teams to what the
hw actually provides, so need to be able to iterate if user asks for more teams
than supported by hw.
Perhaps we should make omp_get_team_num const after omp-expand (like we I think
do for omp_get_thread_num?) to avoid some calls?  Or try to make it cheaper
somehow?

Reply via email to