summaryrefslogtreecommitdiffstats
path: root/mlir
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow constant of unit type.Jacques Pienaar2019-06-012-0/+6
| | | | | | -- PiperOrigin-RevId: 251053682
* Avoid failure due to incomplete type specification.Jacques Pienaar2019-06-012-3/+5
| | | | | | -- PiperOrigin-RevId: 251048081
* [spirv] Add a script to update SPIRVBase.td with new enum attributesLei Zhang2019-06-013-7/+220
| | | | | | | | | | | | This script parses the SPIR-V JSON grammar to extract operand kinds that are enums and generate TableGen definitions for them. Also added a shell script to point to the correct relative file location to simplify command invocation. -- PiperOrigin-RevId: 251041084
* Move NamedAttributeList::get() method out-of-line (fix CMake build due ↵Mehdi Amini2019-06-012-3/+6
| | | | | | | | to missing include) -- PiperOrigin-RevId: 251000296
* Use size_t for tuple type sizeGeoffrey Martin-Noble2019-06-012-3/+3
| | | | | | | | This is more consistent with standard containers. -- PiperOrigin-RevId: 250985851
* Consistently use int64_t for shape-related values in shaped typesGeoffrey Martin-Noble2019-06-013-10/+13
| | | | | | | | | | We want to support 64-bit shapes (even when the compiler is on a 32-bit architecture). Using int64_t consistently allows us to sidestep the bugginess of unsigned arithmetic. Still unsigned: kind, memory space, and bit width. The first two are basically enums. We could have a discussion about the last one, but it's basically just a very large enum as well and we're not doing any math on it, I think. -- PiperOrigin-RevId: 250985791
* Static cast size_t -> int64_t instead of vice versa for equals comparisonsGeoffrey Martin-Noble2019-06-013-13/+14
| | | | | | | | | | These were just introduced by a previous CL moving MemRef getRank to return int64_t. size_t could be smaller than 64 bits and in equals comparisons, signed vs unsigned doesn't matter. In these cases, we know right now that the particular int64_t is not larger than max size_t (because it currently comes directly from a size() call), the alternative cast plus equals comparison is always safe, so we might as well do it that way and no longer require reasoning deeper into the callstack. We are already assuming that size() calls fit into int64_t in a number of other cases like the aforementioned getRank() (since exabytes of RAM are rare). If we want to avoid this assumption we will have to come up with a principled way to do it throughout. -- PiperOrigin-RevId: 250980297
* Add support for providing an output stream to the ↵River Riddle2019-06-012-12/+28
| | | | | | | | SourceMgrDiagnosticHandlers. -- PiperOrigin-RevId: 250974331
* Loop invariant code motion - remove reliance on getForwardSlice. Add ↵Amit Sabne2019-06-012-28/+497
| | | | | | | | more tests. -- PiperOrigin-RevId: 250950703
* NFC: Cleanup method definitions within Parser and add header blocks to ↵River Riddle2019-06-011-652/+712
| | | | | | | | improve readability. -- PiperOrigin-RevId: 250949195
* Fix CMake builds: sources not used in every targets must be marked with ↵Mehdi Amini2019-06-011-0/+5
| | | | | | | | LLVM_OPTIONAL_SOURCES -- PiperOrigin-RevId: 250948796
* Get rid of separate getRank() on MemRef now that it subclasses ShapedTypeGeoffrey Martin-Noble2019-06-015-14/+15
| | | | | | | | We are moving towards int64_t for these shape/dimension -related values to avoid buginess with unsigned arithmetic -- PiperOrigin-RevId: 250945322
* Some cleanup of ShapedType now that MemRef subclasses it.Geoffrey Martin-Noble2019-06-013-34/+16
| | | | | | | | | | | Extract common methods into ShapedType. Simplify methods. Remove some extraneous asserts. Replace sentinel value with a helper method to check the same. -- PiperOrigin-RevId: 250945261
* Make MemRefType subclass ShapedTypeGeoffrey Martin-Noble2019-06-014-25/+19
| | | | | | | | | | | | MemRefs have the same notion of shape, rank, and fixed element type. This allows us to reuse utilities based on shape for memref. All dyn_cast and isa calls for ShapedType have been checked and either modified to explicitly check for vector or tensor, or confirmed to not depend on the result being a vector or tensor. Discussion in https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/cHLoyfGu8y8 -- PiperOrigin-RevId: 250945184
* Don't use ShapedType to indicate vector or tensor typeGeoffrey Martin-Noble2019-06-011-1/+2
| | | | | | | | MemRefType may soon subclass ShapedType. ShapedType only guarantees that something has a shape (possibly dynamic), rank (or explicitly unranked), and fixed element type. -- PiperOrigin-RevId: 250940537
* Fix an msan warning for use of an uninitialized variable.River Riddle2019-06-011-1/+1
| | | | | | -- PiperOrigin-RevId: 250939301
* Remove the newline from the mlir-opt 'split-input-file' flag marker. ↵River Riddle2019-06-011-1/+1
| | | | | | | | This fixes support for DOS style new lines(/r/n). -- PiperOrigin-RevId: 250899420
* Abstract the internal storage of the NamedAttributeList into a new ↵River Riddle2019-06-0110-176/+248
| | | | | | | | | | | attribute, DictionaryAttr. This attribute maintains a sorted list of NamedAttributes. This will allow for operations/functions to maintain sub dictionaries of attributes. The syntax is the same as top level attribute dictionaries: {sub_dictionary: {fn: @someFn, boolAttr: true}} -- PiperOrigin-RevId: 250898950
* Disable named attribute in ODG for ArgOrResultElementTypeIs as was ↵Jacques Pienaar2019-06-013-9/+9
| | | | | | | | taking address of r-value. -- PiperOrigin-RevId: 250805965
* [ODS] Support region names and constraintsLei Zhang2019-06-0110-40/+228
| | | | | | | | | | | | | Similar to arguments and results, now we require region definition in ops to be specified as a DAG expression with the 'region' operator. This way we can specify the constraints for each region and optionally give the region a name. Two kinds of region constraints are added, one allowing any region, and the other requires a certain number of blocks. -- PiperOrigin-RevId: 250790211
* Replace checks against numDynamicDims with hasStaticShapeGeoffrey Martin-Noble2019-06-013-3/+3
| | | | | | -- PiperOrigin-RevId: 250782165
* Replace a usage of std::vector with SmallVector to allow constructing ↵River Riddle2019-06-012-10/+6
| | | | | | | | with non-constant iterators on MSVC. -- PiperOrigin-RevId: 250769027
* Make getRank abort for unranked typeGeoffrey Martin-Noble2019-06-012-2/+3
| | | | | | | | This better matches the other methods in ShapedType which only make sense for ranked types. There's now an explicit hasRank for checking the rank. Actual call sites rarely used the "-1" sentinel to combine checking for rankedness and checking that rank is a certain value. And in most cases they should actually be checking for rankedness at a higher level using type predicates. Using an explicit method is clearer than a sentinel anyway. -- PiperOrigin-RevId: 250720853
* Allow argument and result names replacement in predicates.Jacques Pienaar2019-06-014-1/+75
| | | | | | | | | | This allow specifying $x to refer to an operand's named argument (operand or attribute) or result. Skip variadic operands/results for now pending autogenerated discussion of their accessors. This adds a new predicate, following feedback on the naming but does not remove the old one. Post feedback I'll do that, potentially in follow up. -- PiperOrigin-RevId: 250720003
* Avoid unspecified files error by explicitly including for now.Jacques Pienaar2019-06-011-2/+2
| | | | | | -- PiperOrigin-RevId: 250708336
* Add keywords in target_link_libraries post add_llvm_executable.Jacques Pienaar2019-06-017-3/+7
| | | | | | -- PiperOrigin-RevId: 250704528
* Replace usages of 'add_executable' with 'add_llvm_executable'.River Riddle2019-06-017-7/+7
| | | | | | -- PiperOrigin-RevId: 250691487
* Fix 5 ClangTidy - Readability findings.Jacques Pienaar2019-06-014-5/+2
| | | | | | | | | | | | * the 'empty' method should be used to check for emptiness instead of 'size' * using decl 'CapturableHandle' is unused * redundant get() call on smart pointer * using decl 'apply' is unused * using decl 'ScopeGuard' is unused -- PiperOrigin-RevId: 250623863
* NFC: Inline toString as operations can be streamed directly into ↵River Riddle2019-06-011-19/+6
| | | | | | | | raw_ostream. -- PiperOrigin-RevId: 250619765
* Use hasRank instead of comparing rank to -1Geoffrey Martin-Noble2019-06-011-2/+2
| | | | | | -- PiperOrigin-RevId: 250598252
* Move CondBranchOp to the ODG framework.River Riddle2019-06-013-151/+125
| | | | | | -- PiperOrigin-RevId: 250593367
* Exclude all ShapedType subclasses other than TensorType subclasses from ↵Geoffrey Martin-Noble2019-06-011-5/+6
| | | | | | | | | | having non-scalar elements. The current logic assumes that ShapedType indicates a vector or tensor, which will not be true soon when MemRef subclasses ShapedType -- PiperOrigin-RevId: 250586364
* Check for Vector or Tensor Type rather than ShapedType when matching ↵Geoffrey Martin-Noble2019-06-011-1/+1
| | | | | | | | | | constant splat Only vectors or tensors can be constant splats (or element attrs). This is in preparation for making MemRef subclass ShapedType -- PiperOrigin-RevId: 250586281
* Avoid dyn_cast to ShapedTypeGeoffrey Martin-Noble2019-06-011-3/+2
| | | | | | | | | | ShapedType just indicates shape/rank/element semantics. It's generally not useful for other type checking. This check already checks for vector or tensor type, so we can use a direct cast if we check those first. Related to making MemRefType a subclass of ShapedType -- PiperOrigin-RevId: 250583231
* Make it clear that ElementsAttr is only for static shaped vectors or ↵Geoffrey Martin-Noble2019-06-012-12/+30
| | | | | | | | | | tensors. This is in preparation for making MemRef a subclass of ShapedType, but also UnrankedTensor should already be excluded. -- PiperOrigin-RevId: 250580197
* Remove "size" property of affine maps.MLIR Team2019-06-0135-275/+106
| | | | | | -- PiperOrigin-RevId: 250572818
* LoopFusionUtils CL 2/n: Factor out and generalize slice union computation.Andy Davis2019-06-017-98/+250
| | | | | | | | | | | *) Factors slice union computation out of LoopFusion into Analysis/Utils (where other iteration slice utilities exist). *) Generalizes slice union computation to take the union of slices computed on all loads/stores pairs between source and destination loop nests. *) Fixes a bug in FlatAffineConstraints::addSliceBounds where redundant constraints were added. *) Takes care of a TODO to expose FlatAffineConstraints::mergeAndAlignIds as a public method. -- PiperOrigin-RevId: 250561529
* Change "may never" to "must never"Geoffrey Martin-Noble2019-06-011-1/+1
| | | | | | | | "may never" indicates that it's allowed to never hold a value. I believe the intent here is that it is not allowed to ever hold a value. -- PiperOrigin-RevId: 250560623
* Add whole_archive_link support for MSVC.River Riddle2019-06-011-0/+4
| | | | | | | | | This issue was discovered by @loic-joly-sonarsource with a proposed fix in https://github.com/tensorflow/mlir/pull/22. -- PiperOrigin-RevId: 250558504
* Change elements literal parsing to not rely on shaped type being a ↵Geoffrey Martin-Noble2019-06-012-20/+30
| | | | | | | | | | | | vector or tensor. This is in preparation for making MemRef a ShapedType. In general, a shaped type should be anything with shape, rank, and element type properties, so use sites shouldn't assume more than that. I also pulled the trailing comma parsing out the parseElementsLiteralType (new name) method. It seems weird to have the method parse the type + a trailing comma, even if all call sites currently need that. It's surprising behavior without looking at the implementation. -- PiperOrigin-RevId: 250558363
* Disable the mlir-cpu-runner tests on win32. llvm orc does not support ↵River Riddle2019-06-011-0/+5
| | | | | | | | the COFF rtld. -- PiperOrigin-RevId: 250556116
* Replace the Function reference methods from the OpAsmParser/OpAsmPrinter ↵River Riddle2019-06-015-57/+7
| | | | | | | | with usages of FunctionAttr. -- PiperOrigin-RevId: 250555680
* Add an example of accessing the impl storage to the ↵River Riddle2019-06-011-0/+12
| | | | | | | | 'DefiningAttributesAndTypes' document. -- PiperOrigin-RevId: 250553898
* Remove the Toy/* file path from the location check lines. This assumes a ↵River Riddle2019-06-015-135/+135
| | | | | | | | specific file path format that breaks on MSVC. -- PiperOrigin-RevId: 250549223
* NFC: Switch std::vector to SmallVector. This fixes a compiler error on ↵River Riddle2019-06-011-1/+1
| | | | | | | | MSVC as the StringMap key dereference method is non-const. -- PiperOrigin-RevId: 250538085
* [TableGen] Making printer support $cppClass substitution (similar to ↵Ben Vanik2019-06-011-1/+3
| | | | | | | | parser). -- PiperOrigin-RevId: 250534216
* [spirv] Add ModuleOpLei Zhang2019-06-019-46/+278
| | | | | | | | | | | | | This op defines a SPIR-V module using a MLIR region. The region contains one block. Module-level operations, including functions definitions, are all placed in this block. This CL extracts common definitions from SPIRVOps.td into SPIRVBase.td. The new op is placed in SPIRVStructureOps.td. -- PiperOrigin-RevId: 250522320
* Get rid of redundant verifier, which is implied by the type traits.Rasmus Munk Larsen2019-06-012-8/+1
| | | | | | -- PiperOrigin-RevId: 250511694
* Add a rank op to MLIR. Example:Rasmus Munk Larsen2019-06-015-0/+85
| | | | | | | | %1 = rank %0 : index -- PiperOrigin-RevId: 250505411
* Add lowering linalg.for to LLVM IRNicolas Vasilache2019-06-019-60/+219
| | | | | | | | | This CL adds lowering of linalg.for to LLVM IR and adds an IR test. This also replaces the usage of affine.for with linalg.for and enables the LLVM IR path in the integration test. -- PiperOrigin-RevId: 250503798
OpenPOWER on IntegriCloud