diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-02-11 12:38:04 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-02-11 12:38:11 +0000 |
commit | e3b557809604d036af6e00c60f012c2025b59a5e (patch) | |
tree | 8a11ba2269a3b669601e2fd41145b174008f4da8 /llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp | |
parent | 08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff) |
Diffstat (limited to 'llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp')
-rw-r--r-- | llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp b/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp index c5ab35d94860..35a79ec04b6e 100644 --- a/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp +++ b/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; } |