llvm-project/mlir/lib/IR
River Riddle 5de726f493 Refactor the Pattern framework to allow for combined match/rewrite patterns. This is done by adding a new 'matchAndRewrite' function to RewritePattern that performs the match and rewrite in one step. The default behavior simply calls into the existing 'match' and 'rewrite' functions. The 'PatternMatcher' class has now been specialized for RewritePatterns and has been rewritten to make use of the new matchAndRewrite functionality.
This combined match/rewrite functionality allows simplifying the majority of existing RewritePatterns, as they do not benefit from separate match and rewrite functions.

Some of the existing canonicalization patterns in StandardOps have been modified to take advantage of this functionality.

PiperOrigin-RevId: 240187856
2019-03-29 17:39:35 -07:00
..
AffineExpr.cpp Cleanup post cl/235283610 - NFC 2019-03-29 16:42:20 -07:00
AffineExprDetail.h Remove some statements that required >C++11, add includes and qualify names. NFC. 2019-03-29 17:24:53 -07:00
AffineMap.cpp Optimize the implementation of AffineExprConstantFolder to avoid the redundant creation of IntegerAttrs and IndexType. This becomes a much bigger performance issue when MLIRContext is thread-safe; as each unnecessary call may need to lock a mutex. 2019-03-29 17:18:22 -07:00
AffineMapDetail.h Introduce Fourier-Motzkin variable elimination + other cleanup/support 2019-03-29 13:38:24 -07:00
AsmPrinter.cpp Various small cleanups to the code, mostly removing const_cast's. 2019-03-29 17:37:58 -07:00
AttributeDetail.h Cleanup the construction of attributes and fix a opt-mode bug in DenseElementsAttr when allocating an empty array buffer. 2019-03-29 17:33:15 -07:00
Attributes.cpp Add support for building a DenseIntElementsAttr with ArrayRef<int64_t> values. 2019-03-29 17:29:42 -07:00
Block.cpp Various small cleanups to the code, mostly removing const_cast's. 2019-03-29 17:37:58 -07:00
Builders.cpp Continue pushing const out of the core IR types - in this case, remove const 2019-03-29 17:29:58 -07:00
Dialect.cpp Validate the names of attribute, dialect, and functions during verification. This essentially enforces the parsing rules upon their names. 2019-03-29 16:44:53 -07:00
Function.cpp Continue pushing const out of the core IR types - in this case, remove const 2019-03-29 17:29:58 -07:00
Instruction.cpp Remove const from Value, Instruction, Argument, and the various methods on the 2019-03-29 17:34:33 -07:00
IntegerSet.cpp Introduce Fourier-Motzkin variable elimination + other cleanup/support 2019-03-29 13:38:24 -07:00
IntegerSetDetail.h Introduce Fourier-Motzkin variable elimination + other cleanup/support 2019-03-29 13:38:24 -07:00
Location.cpp Support NameLoc and CallSiteLoc for mlir::Location 2019-03-29 14:37:34 -07:00
LocationDetail.h Give the Location classes their own SmartRWMutex and make sure that they are using the locationAllocator. This is step 4/N to making MLIRContext thread-safe. 2019-03-29 17:19:27 -07:00
MLIRContext.cpp Deconst-ify MLIRContext, and detemplatize some stuff now that const is gone. 2019-03-29 17:35:04 -07:00
Module.cpp Implement initial support for function attributes, including parser, printer, 2019-03-29 13:02:44 -07:00
Operation.cpp Push a bunch of 'consts' out of the *Op structure, in prep for removing 2019-03-29 17:35:35 -07:00
PatternMatch.cpp Refactor the Pattern framework to allow for combined match/rewrite patterns. This is done by adding a new 'matchAndRewrite' function to RewritePattern that performs the match and rewrite in one step. The default behavior simply calls into the existing 'match' and 'rewrite' functions. The 'PatternMatcher' class has now been specialized for RewritePatterns and has been rewritten to make use of the new matchAndRewrite functionality. 2019-03-29 17:39:35 -07:00
StandardTypes.cpp Update some of the derived type classes to use getImpl instead of a static_cast. 2019-03-29 17:38:14 -07:00
TypeDetail.h Add support for a standard TupleType. Though this is a standard type, it merely provides a common mechanism for representing tuples in MLIR. It is up to dialect authors to provides operations for manipulating them, e.g. extract_tuple_element. 2019-03-29 17:25:09 -07:00
Types.cpp Update some of the derived type classes to use getImpl instead of a static_cast. 2019-03-29 17:38:14 -07:00
Value.cpp Remove const from Value, Instruction, Argument, and the various methods on the 2019-03-29 17:34:33 -07:00