[OpenMP] Introduce the OpenMP-IR-Builder
authorJohannes Doerfert <johannes@jdoerfert.de>
Wed, 6 Nov 2019 00:57:44 +0000 (18:57 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 11 Dec 2019 20:38:49 +0000 (14:38 -0600)
commitd23c61490c282a7a8f29aaa5c021cbfdaf87fb6f
treefa809d5b6ada579a2e063c1cb53c9759661273eb
parent6d64162a2d0df2230faf02ff7ee677c448faf4af
[OpenMP] Introduce the OpenMP-IR-Builder

This is the initial patch for the OpenMP-IR-Builder, as discussed on the
mailing list ([1] and later) and at the US Dev Meeting'19.

The design is similar to D61953 but:
  - in a non-WIP status, with proper documentation and working.
  - using a OpenMPKinds.def file to manage lists of directives, runtime
    functions, types, ..., similar to the current Clang implementation.
  - restricted to handle only (simple) barriers, to implement most
    `#pragma omp barrier` directives and most implicit barriers.
  - properly hooked into Clang to be used if possible (D69922).
  - compatible with the remaining code generation.

Parts have been extracted into D69853.

The plan is to have multiple people working on moving logic from Clang
here once the initial scaffolding (=this patch) landed.

[1] http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/2019-May/000197.html

Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim

Subscribers: mgorny, hiraditya, bollu, guansong, jfb, cfe-commits, llvm-commits, penzn, ppenzin

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D69785
llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h [new file with mode: 0644]
llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
llvm/lib/Frontend/OpenMP/CMakeLists.txt
llvm/lib/Frontend/OpenMP/OMPConstants.cpp
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp [new file with mode: 0644]
llvm/unittests/CMakeLists.txt
llvm/unittests/Frontend/CMakeLists.txt [new file with mode: 0644]
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp [new file with mode: 0644]