diff options
author | Arvind Sudarsanam <arvind.sudarsanam@intel.com> | 2025-04-16 10:13:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-16 14:13:30 +0000 |
commit | 6cfec29cb9bc44ec907eeda99df508985ecbd49b (patch) | |
tree | d057b6174cbb5898c6c973aeffd666765695ff0f /llvm | |
parent | 181872ffcc7dc7f20ed2b84e8fa39beba41cb6d3 (diff) | |
download | llvm-6cfec29cb9bc44ec907eeda99df508985ecbd49b.zip llvm-6cfec29cb9bc44ec907eeda99df508985ecbd49b.tar.gz llvm-6cfec29cb9bc44ec907eeda99df508985ecbd49b.tar.bz2 |
[Offload][SYCL] Refactor OffloadKind implementation (#135809)
Following are the changes:
1. Make OffloadKind enum values to be powers of two so we can use them
like a bitfield
2. Include OFK_SYCL enum value
3. Modify ActiveOffloadKinds support in clang-linker-wrapper to use
bitfields instead of a vector.
Thanks
---------
Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com>
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/Object/OffloadBinary.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/include/llvm/Object/OffloadBinary.h b/llvm/include/llvm/Object/OffloadBinary.h index c02aec8..a3b78b8ec 100644 --- a/llvm/include/llvm/Object/OffloadBinary.h +++ b/llvm/include/llvm/Object/OffloadBinary.h @@ -32,10 +32,11 @@ namespace object { /// The producer of the associated offloading image. enum OffloadKind : uint16_t { OFK_None = 0, - OFK_OpenMP, - OFK_Cuda, - OFK_HIP, - OFK_LAST, + OFK_OpenMP = (1 << 0), + OFK_Cuda = (1 << 1), + OFK_HIP = (1 << 2), + OFK_SYCL = (1 << 3), + OFK_LAST = (1 << 4), }; /// The type of contents the offloading image contains. |