LLVM and parallelization

Hi,

I know LLVM provides thread-level automatic parallel support using OpenMP (see http://blog.llvm.org/2015/05/openmp-support_22.html.)), but it is not clear for me which of the following is correct?

  1. Clang inserts in the source code OpenMP compiler directives, so, it auto-parallelizes the serial source code provided as input or
  2. Clang can compile manually written parallel source code that uses OpenMP directives

Best regards,
Iulia Stirb

From: "Iulia Stirb via llvm-dev" <llvm-dev@lists.llvm.org>
To: llvm-dev@lists.llvm.org
Sent: Wednesday, December 16, 2015 9:28:54 AM
Subject: [llvm-dev] LLVM and parallelization

Hi,

I know LLVM provides t hread-level automatic parallel support using
OpenMP (see OpenMP Support - The LLVM Project Blog ),
but it is not clear for me which of the following is correct?

1. Clang inserts in the source code OpenMP compiler directives, so,
it auto-parallelizes the serial source code provided as input or
2. Clang can compile manually written parallel source code that uses
OpenMP directives

Thus far, only (2). There is, however, experimental support for (1) in the Polly project.

-Hal

Hi Hal,

Thank you for the answer.

I tried to compile using Polly (clang -O3 -mllvm -polly -mllvm -polly-parallel -lgomp) but I get an warning saying polly argument is not used.

What do you mean when you say it has experimental support for (1) in the Polly project? Is (1) already implemented in clang and available for users?

Regards,
Iulia

From: “Iulia Stirb via llvm-dev” <llvm-dev@lists.llvm.org>
To: llvm-dev@lists.llvm.org
Sent: Wednesday, December 16, 2015 9:28:54 AM
Subject: [llvm-dev] LLVM and parallelization

Hi,

I know LLVM provides t hread-level automatic parallel support using
OpenMP (see http://blog.llvm.org/2015/05/openmp-support_22.html ),
but it is not clear for me which of the following is correct?

  1. Clang inserts in the source code OpenMP compiler directives, so,
    it auto-parallelizes the serial source code provided as input or
  2. Clang can compile manually written parallel source code that uses
    OpenMP directives

Thus far, only (2). There is, however, experimental support for (1) in the Polly project.

-Hal

You need to build clang with Polly: http://polly.llvm.org/example_load_Polly_into_clang.html