Skip to content

Commit

Permalink
[OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def
Browse files Browse the repository at this point in the history
Summary:
Replace the OpenMP Runtime Library functions used in CGOpenMPRuntimeGPU
for OpenMP device code generation with ones in OMPKinds.def and use
OMPIRBuilder for generating runtime calls. This allows us to consolidate
more OpenMP code generation into the OMPIRBuilder. This patch also
invalidates specifying target architectures with conflicting pointer
sizes.

Reviewers: jdoerfert

Subscribers: aaron.ballman cfe-commits guansong llvm-commits sstefan1 yaxunl

Tags: #OpenMP #Clang #LLVM

Differential Revision: https://reviews.llvm.org/D88430
  • Loading branch information
jhuber6 committed Sep 30, 2020
1 parent 9d2378b commit 90eaedd
Show file tree
Hide file tree
Showing 6 changed files with 319 additions and 687 deletions.
5 changes: 3 additions & 2 deletions clang/lib/CodeGen/CGOpenMPRuntime.h
Expand Up @@ -306,6 +306,9 @@ class CGOpenMPRuntime {
CodeGenModule &CGM;
StringRef FirstSeparator, Separator;

/// An OpenMP-IR-Builder instance.
llvm::OpenMPIRBuilder OMPBuilder;

/// Constructor allowing to redefine the name separator for the variables.
explicit CGOpenMPRuntime(CodeGenModule &CGM, StringRef FirstSeparator,
StringRef Separator);
Expand Down Expand Up @@ -386,8 +389,6 @@ class CGOpenMPRuntime {
llvm::Value *getCriticalRegionLock(StringRef CriticalName);

private:
/// An OpenMP-IR-Builder instance.
llvm::OpenMPIRBuilder OMPBuilder;

/// Map for SourceLocation and OpenMP runtime library debug locations.
typedef llvm::DenseMap<unsigned, llvm::Value *> OpenMPDebugLocMapTy;
Expand Down

0 comments on commit 90eaedd

Please sign in to comment.