[llvm-dev] Loop unrolling pragma and OpenMP

ardi via llvm-dev llvm-dev at lists.llvm.org
Mon May 24 01:01:43 PDT 2021


Hi,

Newer OpenMP versions include a construct for loop unrolling, but,
however, I was wondering if the regular clang pragma for loop
unrolling can be safely mixed with an OpenMP loop,without using the
new OpenMP feature.

I mean, is this guaranteed to work?

#pragma omp parallel for
#pragma clang loop unroll_count(N)
for(i=0;i<n;i++) {
   whatever();
}

Thanks a lot!


More information about the llvm-dev mailing list