Skip to content

Commit 90eaedd

Browse files
committed
[OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def
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
1 parent 9d2378b commit 90eaedd

File tree

6 files changed

+319
-687
lines changed

6 files changed

+319
-687
lines changed

clang/lib/CodeGen/CGOpenMPRuntime.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ class CGOpenMPRuntime {
306306
CodeGenModule &CGM;
307307
StringRef FirstSeparator, Separator;
308308

309+
/// An OpenMP-IR-Builder instance.
310+
llvm::OpenMPIRBuilder OMPBuilder;
311+
309312
/// Constructor allowing to redefine the name separator for the variables.
310313
explicit CGOpenMPRuntime(CodeGenModule &CGM, StringRef FirstSeparator,
311314
StringRef Separator);
@@ -386,8 +389,6 @@ class CGOpenMPRuntime {
386389
llvm::Value *getCriticalRegionLock(StringRef CriticalName);
387390

388391
private:
389-
/// An OpenMP-IR-Builder instance.
390-
llvm::OpenMPIRBuilder OMPBuilder;
391392

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

0 commit comments

Comments
 (0)