[PATCH] D75870: [mlir][spirv] Add a pass to deduce version/extension/capability
Mahesh Ravishankar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 12:00:49 PDT 2020
mravishankar requested changes to this revision.
mravishankar added inline comments.
This revision now requires changes to proceed.
================
Comment at: mlir/include/mlir/Dialect/SPIRV/Passes.h:37
+/// actually needed for a specific spv.module op.
+std::unique_ptr<OpPassBase<spirv::ModuleOp>>
+createUpdateVersionCapabilityExtensionPass();
----------------
This seems to assume that there is a "linear" order of capabilities and extensions. Is that the case?
Also, is there a way to have a "Base" limit you can start with? It can be the most lenient or the least lenient set
================
Comment at: mlir/lib/Dialect/SPIRV/TargetAndABI.cpp:298
+spirv::TargetEnvAttr spirv::lookupTargetEnv(Operation *op) {
+ for (; op; op = op->getParentOp()) {
+ op = SymbolTable::getNearestSymbolTable(op);
----------------
Nit: To me reading this as a while loop is easier, but I dont know what the convention is
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