Note

This document is a work in progress and most of the expected content is not yet available. While you can expect changes, we always welcome feedback and additions. Please post on the Discourse forums (Runtimes - OpenMP)..

LLVM/OpenMP Design & Overview

OpenMP impacts various parts of the LLVM project, from the frontends (Clang and Flang), through middle-end optimizations, up to the multitude of available OpenMP runtimes.

A high-level overview of OpenMP in LLVM can be found here.

OpenACC Support

OpenACC support is under development for both Flang and Clang. For this purpose, LLVM’s OpenMP runtimes are being extended to serve as OpenACC runtimes. In some cases, Clang supports OpenMP extensions to make the additional functionality also available in OpenMP applications.

LLVM/OpenMP Optimizations

LLVM, since version 11 (12 Oct 2020), has an OpenMP-Aware optimization pass as well as the ability to perform “scalar optimizations” across OpenMP region boundaries.

In-depth discussion of the topic can be found here.

LLVM/OpenMP Optimization Remarks

LLVM has an elaborate ecosystem around analysis and optimization remarks issues during compilation. The remarks can be enabled from the clang frontend [1] [2] in various formats [3] [4] to be used by tools, i.a., opt-viewer or llvm-opt-report (dated).

The OpenMP optimizations in LLVM have been developed with remark support as a priority. For a list of OpenMP specific remarks and more information on them, please refer to OpenMP Optimization Remarks.

OpenMP Command-Line Argument Reference

In addition to the Clang command-line argument reference we also recommend the OpenMP command-line argument reference page that offers a detailed overview of options specific to OpenMP. It also contains a list of OpenMP offloading related command-line arguments.

Support, Getting Involved, and Frequently Asked Questions (FAQ)

Dealing with OpenMP can be complicated. For help with the setup of an OpenMP (offload) capable compiler toolchain, its usage, and common problems, consult the Support and FAQ page.

We also encourage everyone interested in OpenMP in LLVM to get involved.

Release Notes

The current (in-progress) release notes can be found here while release notes for releases, starting with LLVM 12, will be available on the Download Page.