[PATCH] D72503: [mlir][spirv] Fix typos related to (de)serialization.

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 09:04:02 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0b032d7ba715: [mlir][spirv] Fix typos related to (de)serialization. (authored by denis13, committed by antiagainst).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72503/new/

https://reviews.llvm.org/D72503

Files:
  mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
  mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp


Index: mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
===================================================================
--- mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
+++ mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
@@ -1448,13 +1448,13 @@
   auto mergeID = getBlockID(mergeBlock);
 
   // Emit the selection header block, which dominates all other blocks, first.
-  // We need to emit an OpSelectionMerge instruction before the loop header
+  // We need to emit an OpSelectionMerge instruction before the selection header
   // block's terminator.
   auto emitSelectionMerge = [&]() {
-    // TODO(antiagainst): properly support loop control here
+    // TODO(antiagainst): properly support selection control here
     encodeInstructionInto(
         functionBody, spirv::Opcode::OpSelectionMerge,
-        {mergeID, static_cast<uint32_t>(spirv::LoopControl::None)});
+        {mergeID, static_cast<uint32_t>(spirv::SelectionControl::None)});
   };
   // For structured selection, we cannot have blocks in the selection construct
   // branching to the selection header block. Entering the selection (and
Index: mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
===================================================================
--- mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
+++ mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
@@ -1558,10 +1558,10 @@
   if (operands.size() < 2) {
     return emitError(
         unknownLoc,
-        "OpLoopMerge must specify merge target and selection control");
+        "OpSelectionMerge must specify merge target and selection control");
   }
 
-  if (static_cast<uint32_t>(spirv::LoopControl::None) != operands[1]) {
+  if (static_cast<uint32_t>(spirv::SelectionControl::None) != operands[1]) {
     return emitError(unknownLoc,
                      "unimplmented OpSelectionMerge selection control: ")
            << operands[2];


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72503.237353.patch
Type: text/x-patch
Size: 1918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200110/7f3274e6/attachment.bin>


More information about the llvm-commits mailing list