jhuber6 added inline comments.
================ Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58-70 + OffloadRegionKernelEntry = 0x0, + }; + + /// The kind flag of the global variable entry. + enum OffloadVarEntryKindFlag : uint32_t { + /// Mark the entry as a global variable. + OffloadGlobalVarEntry = 0x0, ---------------- tra wrote: > I'm a bit puzzled by this arrangement. Are those actually flags (i.e. can be > set independently) or are they enumerating specific offload kinds (i.e. only > one of these values is intended to be set)? > > I think we want the latter. If that's the case I'd propose to enumerate > kernel and data together, so each kind gets a distinct value and is easy to > tell when one needs to examine the offload table manually. Right now both > kernels and global vars set the flags to 0. > It probably should just be an enumeration. I was tentatively keeping them somewhat separate because OpenMP uses different values for these flags, but I think keeping this completely compatible is an impossible proposition. If we need them to use the same flag we should be able to configure that at some point. I will change it to just be a standard enum (I don't handle anything but kernels and regular globals in the linker wrapper right now anyway) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123471/new/ https://reviews.llvm.org/D123471 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits