[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

Ryotaro Kasuga via cfe-commits cfe-commits at lists.llvm.org
Wed May 14 07:07:30 PDT 2025


kasuga-fj wrote:

Thanks for sharing. I haven't looked at the details yet, but I simplified it as follows.

```c
#include <omp.h>

void g(float);

void f(int m) {
#pragma omp parallel
  {
    float v0 = 0.0;
#pragma omp simd reduction(+:v0)
#pragma unroll(4)
    for(int i=0; i < m; i++)
    {
      v0 += i;
    }

#pragma omp barrier
    g(v0);
  }
}

```

godbold: https://godbolt.org/z/P3cW4To99

https://github.com/llvm/llvm-project/pull/131985


More information about the cfe-commits mailing list