summaryrefslogtreecommitdiffstats
path: root/mlir/examples/toy
Commit message (Collapse)AuthorAgeFilesLines
...
* NFC: Tidy up DialectConversion.cpp and rename DialectOpConversion to ↵River Riddle2019-05-202-14/+18
| | | | | | | | DialectConversionPattern. -- PiperOrigin-RevId: 248980810
* Update the rewrite methods of each of the DialectConversion patterns to ↵River Riddle2019-05-201-6/+4
| | | | | | | | notify the PatternRewriter that the operation is being replaced. -- PiperOrigin-RevId: 248965082
* Move the ConversionListBuilder utility to PatternMatch.h and rename it ↵River Riddle2019-05-204-10/+8
| | | | | | | | to RewriteListBuilder. It has no specific functionality for DialectOpConversion patterns and can be useful for RewritePatterns in general. -- PiperOrigin-RevId: 248884466
* Rewrite the DialectOpConversion patterns to inherit from RewritePattern ↵River Riddle2019-05-202-37/+25
| | | | | | | | instead of Pattern. This simplifies the infrastructure a bit by being able to reuse PatternRewriter and the RewritePatternMatcher, but also starts to lay the groundwork for a more generalized legalization framework that can operate on DialectOpConversions as well as normal RewritePatterns. -- PiperOrigin-RevId: 248836492
* Fix lingering sign compare warnings in exposed by "ninja check-mlir".Stella Laurenzo2019-05-202-2/+2
| | | | | | -- PiperOrigin-RevId: 248050178
* Fix -Wsign-compare in Toy LateLowering.Jacques Pienaar2019-05-201-2/+2
| | | | | | -- PiperOrigin-RevId: 248005642
* Add a utility method to MLIRContext get a registered dialect with the ↵River Riddle2019-05-201-2/+2
| | | | | | | | | | | | | | derived type instead of the string name. The derived dialect type must provide a static 'getDialectNamespace' method. This means that we can now do something like: ctx->getRegisteredDialect<LLVMDialect>(); as opposed to: static_cast<LLVMDialect *>(ctx->getRegisteredDialect("llvm"); -- PiperOrigin-RevId: 247989896
* Remove the explicit "friend Operation" statement from each of the ↵River Riddle2019-05-203-26/+0
| | | | | | | | derived operations now that op casting is no longer inside of Operation. -- PiperOrigin-RevId: 247791672
* Replace Operation::isa with llvm::isa.River Riddle2019-05-201-1/+1
| | | | | | -- PiperOrigin-RevId: 247789235
* Replace Operation::cast with llvm::cast.River Riddle2019-05-206-17/+17
| | | | | | -- PiperOrigin-RevId: 247785983
* Add support for using llvm::dyn_cast/cast/isa for operation casts and ↵River Riddle2019-05-204-13/+13
| | | | | | | | replace usages of Operation::dyn_cast with llvm::dyn_cast. -- PiperOrigin-RevId: 247780086
* Automated rollback of changelist 247778391.MLIR Team2019-05-204-13/+13
| | | | PiperOrigin-RevId: 247778691
* Add support for using llvm::dyn_cast/cast/isa for operation casts and ↵River Riddle2019-05-204-13/+13
| | | | | | | | replace usages of Operation::dyn_cast with llvm::dyn_cast. -- PiperOrigin-RevId: 247778391
* Fix unused variable warning in the Toy tutorial (NFC)Mehdi Amini2019-05-102-2/+0
| | | | | | -- PiperOrigin-RevId: 247672377
* Add explicit friendship with Operation to each derived op class to ↵River Riddle2019-05-063-0/+26
| | | | | | | | ensure access to the inherited protected constructor of `Op`. Some compiler versions have different rules for the visibility of inherited constructors. -- PiperOrigin-RevId: 246661686
* Fix typo (transpose -> reshape).Guangda Lai2019-04-232-2/+2
| | | | | | -- PiperOrigin-RevId: 244270801
* Expose `setupTargetTriple` as a public static method on ExecutionEngineMehdi Amini2019-04-111-0/+1
| | | | | | | | | | This allows client to be able to reuse the same logic to setup a module for the ExecutionEngine without instanciating one. One use case is running the optimization pipeline but not JIT-ing. -- PiperOrigin-RevId: 242614380
* Fix Toy cmake build: add missing includesMehdi Amini2019-04-081-0/+3
| | | | | | -- PiperOrigin-RevId: 242609231
* Toy tutorial Chapter 5: Lowering to Linalg and LLVMMehdi Amini2019-04-0819-2/+4220
| | | | | | -- PiperOrigin-RevId: 242606796
* Fix bug in Toy tutorial where IR emission stopped after any `print`Mehdi Amini2019-04-083-3/+3
| | | | | | -- PiperOrigin-RevId: 242407970
* Change the asmprinter to use pretty syntax for dialect types when it can,Chris Lattner2019-04-076-12/+12
| | | | | | | | | | | | making the IR dumps much nicer. This is part 2/3 of the path to making dialect types more nice. Part 3/3 will slightly generalize the set of characters allowed in pretty types and make it more principled. -- PiperOrigin-RevId: 242249955
* Add new utilities for RTTI Operation casting: dyn_cast_or_null and ↵River Riddle2019-04-071-12/+10
| | | | | | | | | | | | | | | | | | | | | isa_nonnull * dyn_cast_or_null - This will first check if the operation is null before trying to 'dyn_cast': Value *v = ...; if (auto forOp = dyn_cast_or_null<AffineForOp>(v->getDefiningOp())) ... * isa_nonnull - This will first check if the pointer is null before trying to 'isa': Value *v = ...; if (isa_nonnull<AffineForOp>(v->getDefiningOp()); ... -- PiperOrigin-RevId: 242171343
* Fix CMake build: account for renamed files and add missing include on MacOSMehdi Amini2019-04-052-0/+23
| | | | | | -- PiperOrigin-RevId: 242101364
* NFC: Fix a few typos in the tutorials and one in the comment of ↵River Riddle2019-04-052-2/+2
| | | | | | | | FunctionAttr::dropFunctionReference. -- PiperOrigin-RevId: 242050934
* Add Chapter 4 for the Toy tutorial: shape inference, function ↵Mehdi Amini2019-04-0515-56/+3324
| | | | | | | | specialization, and basic combines -- PiperOrigin-RevId: 242050514
* NFC: Fix erroneous use of 'OpaqueType' with 'Type' when setting the ↵River Riddle2019-04-051-1/+1
| | | | | | | | ToyTypeKind, as well as a few mistakes in Chapter 2 of the Toy tutorial. -- PiperOrigin-RevId: 242021477
* Chapter 3 for Toy tutorial: introduction of a dialectMehdi Amini2019-04-0312-6/+2648
| | | | | | -- PiperOrigin-RevId: 241849162
* Rename UnknownType to OpaqueType (NFC)Mehdi Amini2019-04-031-2/+2
| | | | | | | | | This came up in a review of the tutorial, it was suggested that "opaque" is more descriptive than "unknown" here. -- PiperOrigin-RevId: 241832927
* Move the top-level `tutorial` as `Linalg` nested in the examples folderMehdi Amini2019-04-031-0/+7
| | | | | | -- PiperOrigin-RevId: 241831176
* Fix Toy tutorial gcc 7 build (NFC)Mehdi Amini2019-04-021-8/+2
| | | | | | -- PiperOrigin-RevId: 241613710
* Chapter 2 of the Toy tutorialMehdi Amini2019-04-029-0/+1969
| | | | | | | | | This introduces a basic MLIRGen through straight AST traversal, without dialect registration at this point. -- PiperOrigin-RevId: 241588354
* Initial version for chapter 1 of the Toy tutorialMehdi Amini2019-04-027-0/+1345
-- PiperOrigin-RevId: 241549247
OpenPOWER on IntegriCloud