[PATCH] D88430: [OpenMP] Replace OpenMP RTL Functions With OMPIRBuilder and OMPKinds.def

Stefan Stipanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 12:28:40 PDT 2020


sstefan1 added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.h:38
+  /// An OpenMP-IR-Builder instance.
+  llvm::OpenMPIRBuilder OMPBuilder;
+
----------------
jhuber6 wrote:
> sstefan1 wrote:
> > There's already an instance of `OpenMPIRBuilder` in `CGOpenMPRuntime`.
> > 
> > Maybe just make it protected?
> When it's generating `__kmpc_shuffle_intxx`  around line 2480 it gets an instance of `CGOpenMPRuntimeGPU` indirectly which meant I had to make it public so it could use it. I could probably rewrite all the functions to be inside the class but I'm not sure if that'll break anything. So I just made it public for now.
I think that shouldn't be a problem. There is `getOMPBuilder()` in `CGOpenMPRuntime`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88430/new/

https://reviews.llvm.org/D88430



More information about the cfe-commits mailing list