OpenMP Support

Clang fully supports OpenMP 3.1 + some elements of OpenMP 4.5. Clang supports offloading to X86_64, AArch64 and PPC64[LE] devices. Support for Cuda devices is not ready yet. The status of major OpenMP 4.5 features support in Clang.

Standalone directives

  • #pragma omp [for] simd: Complete.
  • #pragma omp declare simd: Partial. We support parsing/semantic analysis + generation of special attributes for X86 target, but still missing the LLVM pass for vectorization.
  • #pragma omp taskloop [simd]: Complete.
  • #pragma omp target [enter|exit] data: Complete.
  • #pragma omp target update: Complete.
  • #pragma omp target: Complete.
  • #pragma omp declare target: Partial. No full codegen support.
  • #pragma omp teams: Complete.
  • #pragma omp distribute [simd]: Complete.
  • #pragma omp distribute parallel for [simd]: Complete.

Combined directives

  • #pragma omp parallel for simd: Complete.
  • #pragma omp target parallel: Complete.
  • #pragma omp target parallel for [simd]: Complete.
  • #pragma omp target simd: Complete.
  • #pragma omp target teams: Complete.
  • #pragma omp teams distribute [simd]: Complete.
  • #pragma omp target teams distribute [simd]: Complete.
  • #pragma omp teams distribute parallel for [simd]: Complete.
  • #pragma omp target teams distribute parallel for [simd]: Complete.

Clang does not support any constructs/updates from upcoming OpenMP 5.0 except for reduction-based clauses in the task and target-based directives. In addition, the LLVM OpenMP runtime libomp supports the OpenMP Tools Interface (OMPT) on x86, x86_64, AArch64, and PPC64 on Linux, Windows, and mac OS.