[PATCH] D74876: [mlir] Refactor the structure of the 'verifyConstructionInvariants' methods.
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 15:24:10 PST 2020
rriddle created this revision.
rriddle added a reviewer: bondhugula.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, mehdi_amini.
Herald added a reviewer: mravishankar.
Herald added a reviewer: antiagainst.
Herald added a project: LLVM.
The current structure suffers from several problems, but the main one is that a construction failure is impossible to debug when using the 'get' methods. This is because we only optionally emit errors, so there is no context given to the user about the problem. This revision restructures this so that errors are always emitted, and the 'get' methods simply pass in an UnknownLoc to emit to. This allows for removing usages of the more constrained "emitOptionalLoc", as well as removing the need for the context parameter.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74876
Files:
mlir/docs/DefiningAttributesAndTypes.md
mlir/include/mlir/Dialect/QuantOps/QuantTypes.h
mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
mlir/include/mlir/IR/Attributes.h
mlir/include/mlir/IR/Location.h
mlir/include/mlir/IR/StandardTypes.h
mlir/include/mlir/IR/StorageUniquerSupport.h
mlir/include/mlir/IR/Types.h
mlir/lib/Dialect/QuantOps/IR/QuantTypes.cpp
mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
mlir/lib/IR/Attributes.cpp
mlir/lib/IR/MLIRContext.cpp
mlir/lib/IR/StandardTypes.cpp
mlir/lib/IR/Types.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74876.245541.patch
Type: text/x-patch
Size: 41749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200219/dfce6f88/attachment-0001.bin>
More information about the llvm-commits
mailing list