[PATCH] D123471: [CUDA] Create offloading entries when using the new driver
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 6 15:02:12 PDT 2022
jhuber6 added inline comments.
================
Comment at: clang/lib/CodeGen/CGCUDARuntime.h:56-70
+ enum OffloadRegionEntryKindFlag : uint32_t {
+ /// Mark the region entry as a kernel.
+ OffloadRegionKernelEntry = 0x0,
+ };
+
+ /// The kind flag of the global variable entry.
+ enum OffloadVarEntryKindFlag : uint32_t {
----------------
tra wrote:
> jhuber6 wrote:
> > tra wrote:
> > > We can also fold both enums into one, as we still have the ambiguity of what `flags=0` means.
> > They're selected based on the size, if the size is zero it uses the kernel flags, otherwise it uses the variable flags. That's how it's done for OpenMP. I figured keeping the enums separate makes that more clear.
> > They're selected based on the size, if the size is zero it uses the kernel flags, otherwise it uses the variable flags.
>
> Why use two different enums, when one would do? It does not buy us anything other than unnecessary additional complexity.
>
I mostly copied this from OpenMP, I can merge it into one.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123471/new/
https://reviews.llvm.org/D123471
More information about the cfe-commits
mailing list