aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp b/contrib/llvm-project/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp
index c5ab35d94860..35a79ec04b6e 100644
--- a/contrib/llvm-project/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp
+++ b/contrib/llvm-project/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp
@@ -14,7 +14,6 @@
#include "llvm/BinaryFormat/AMDGPUMetadataVerifier.h"
#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/BinaryFormat/MsgPackDocument.h"
@@ -57,7 +56,7 @@ bool MetadataVerifier::verifyInteger(msgpack::DocNode &Node) {
bool MetadataVerifier::verifyArray(
msgpack::DocNode &Node, function_ref<bool(msgpack::DocNode &)> verifyNode,
- Optional<size_t> Size) {
+ std::optional<size_t> Size) {
if (!Node.isArray())
return false;
auto &Array = Node.getArray();
@@ -263,6 +262,8 @@ bool MetadataVerifier::verifyKernel(msgpack::DocNode &Node) {
if (!verifyScalarEntry(KernelMap, ".uses_dynamic_stack", false,
msgpack::Type::Boolean))
return false;
+ if (!verifyIntegerEntry(KernelMap, ".workgroup_processor_mode", false))
+ return false;
if (!verifyIntegerEntry(KernelMap, ".kernarg_segment_align", true))
return false;
if (!verifyIntegerEntry(KernelMap, ".wavefront_size", true))
@@ -277,6 +278,9 @@ bool MetadataVerifier::verifyKernel(msgpack::DocNode &Node) {
return false;
if (!verifyIntegerEntry(KernelMap, ".vgpr_spill_count", false))
return false;
+ if (!verifyIntegerEntry(KernelMap, ".uniform_work_group_size", false))
+ return false;
+
return true;
}