tra 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 {
----------------
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123471/new/
https://reviews.llvm.org/D123471
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits