Skip to content

Commit 1c1c4c3

Browse files
committed
[SYCL][NFC] Register new property category
New category is going to be used for storing information about composite specialization constants.
1 parent 29030f9 commit 1c1c4c3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

llvm/include/llvm/Support/PropertySetIO.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ class PropertyValue {
8080

8181
PropertyValue(uint32_t Val) : Ty(UINT32), Val({Val}) {}
8282
PropertyValue(const byte *Data, SizeTy DataBitSize);
83+
template <typename T>
84+
PropertyValue(const std::vector<T> &Data)
85+
: PropertyValue(reinterpret_cast<const byte *>(Data.data()),
86+
Data.size() * sizeof(T) * /* bits in one byte */ 8) {}
8387
PropertyValue(const PropertyValue &P);
8488
PropertyValue(PropertyValue &&P);
8589

@@ -179,6 +183,8 @@ class PropertySetRegistry {
179183
// Specific property category names used by tools.
180184
static constexpr char SYCL_SPECIALIZATION_CONSTANTS[] =
181185
"SYCL/specialization constants";
186+
static constexpr char SYCL_COMPOSITE_SPECIALIZATION_CONSTANTS[] =
187+
"SYCL/composite specialization constants";
182188
static constexpr char SYCL_DEVICELIB_REQ_MASK[] = "SYCL/devicelib req mask";
183189
static constexpr char SYCL_KERNEL_PARAM_OPT_INFO[] = "SYCL/kernel param opt";
184190

llvm/lib/Support/PropertySetIO.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ void PropertyValue::copy(const PropertyValue &P) {
197197
constexpr char PropertySetRegistry::SYCL_SPECIALIZATION_CONSTANTS[];
198198
constexpr char PropertySetRegistry::SYCL_DEVICELIB_REQ_MASK[];
199199
constexpr char PropertySetRegistry::SYCL_KERNEL_PARAM_OPT_INFO[];
200+
constexpr char PropertySetRegistry::SYCL_COMPOSITE_SPECIALIZATION_CONSTANTS[];
200201

201202
} // namespace util
202203
} // namespace llvm

0 commit comments

Comments
 (0)