[PATCH] D75870: [mlir][spirv] Add a pass to deduce version/extension/capability

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 15:45:23 PDT 2020


rriddle added inline comments.


================
Comment at: mlir/lib/Dialect/SPIRV/Transforms/UpdateVCEPass.cpp:75
+      if (deducedVersion > allowedVersion) {
+        emitError(op->getLoc(), "'")
+            << op->getName() << "' requires min version "
----------------
nit: You can return the error directly. LogicalResult converts to WalkResult, (failure -> interrupt, success -> advance).


================
Comment at: mlir/lib/Dialect/SPIRV/Transforms/UpdateVCEPass.cpp:121
+      for (const auto &ors : capabilities.getCapabilities()) {
+        bool satisfied = false; // True when at least one capability can be used
+        for (spirv::Capability cap : ors) {
----------------
nit: Move the comment before the variable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75870





More information about the llvm-commits mailing list