mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-25 23:00:15 +00:00
6874726610
This allows adding a C function pointer as a matchAndRewrite style pattern, which is a very common case. This adopts it in ExpandTanh to show how it reduces a level of nesting. We could allow C++ lambdas here, but that doesn't work as well with type inference in the common case. Instead of: patterns.insert(convertTanhOp); you need to specify: patterns.insert<math::TanhOp>(convertTanhOp); which is boilerplate'y. Capturing state like this is very uncommon, so we choose to require clients to define their own structs and use the non-convenience method when they need to do so. Differential Revision: https://reviews.llvm.org/D99039 |
||
---|---|---|
.. | ||
cmake/modules | ||
docs | ||
examples | ||
include | ||
lib | ||
test | ||
tools | ||
unittests | ||
utils | ||
.clang-format | ||
.clang-tidy | ||
CMakeLists.txt | ||
LICENSE.TXT | ||
README.md |
Multi-Level Intermediate Representation
See https://mlir.llvm.org/ for more information.