forked from OSchip/llvm-project
b3ee7f1f31
This revision adds a new `StaticVerifierFunctionEmitter` class that emits local static functions in the .cpp file for shared operation verification. This class deduplicates shared operation verification code by emitting static functions alongside the op definitions. These methods are local to the definition file, and are invoked within the operation verify methods. The first bit of shared verification is for the type constraints used when verifying operands and results. An example is shown below: ``` static LogicalResult localVerify(...) { ... } LogicalResult OpA::verify(...) { if (failed(localVerify(...))) return failure(); ... } LogicalResult OpB::verify(...) { if (failed(localVerify(...))) return failure(); ... } ``` This allowed for saving >400kb of code size from a downstream TensorFlow project (~15% of MLIR code size). Differential Revision: https://reviews.llvm.org/D91381 |
||
---|---|---|
.. | ||
mlir-cpu-runner | ||
mlir-cuda-runner | ||
mlir-linalg-ods-gen | ||
mlir-opt | ||
mlir-reduce | ||
mlir-rocm-runner | ||
mlir-shlib | ||
mlir-spirv-cpu-runner | ||
mlir-tblgen | ||
mlir-translate | ||
mlir-vulkan-runner | ||
CMakeLists.txt |