River Riddle [Sat, 18 May 2019 20:23:38 +0000 (13:23 -0700)]
Move the ConversionListBuilder utility to PatternMatch.h and rename it to RewriteListBuilder. It has no specific functionality for DialectOpConversion patterns and can be useful for RewritePatterns in general.
--
PiperOrigin-RevId:
248884466
River Riddle [Sat, 18 May 2019 18:09:07 +0000 (11:09 -0700)]
Add user iterators to IRObjects, i.e. Values.
--
PiperOrigin-RevId:
248877752
Geoffrey Martin-Noble [Sat, 18 May 2019 12:31:35 +0000 (05:31 -0700)]
Make shape matching work for any shaped type.
The current implementation makes some assumptions about what can be a shaped type, which aren't really necessary. It also has strange behavior for types that aren't in the limited set it handles (e.g. dialect-defined types)
Updated the comment to match the implementation.
This is partially motivated by the desire to make MemRef a subclass of ShapedType
--
PiperOrigin-RevId:
248859674
River Riddle [Sat, 18 May 2019 05:21:13 +0000 (22:21 -0700)]
Rewrite the DialectOpConversion patterns to inherit from RewritePattern 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
Geoffrey Martin-Noble [Sat, 18 May 2019 02:45:45 +0000 (19:45 -0700)]
Clean up tablegen vector and tensor types
There was a weird mix of names, styles, and inheritance here. I think this makes it cleaner and more consistent. We can also have a more principled and far-reaching refactor of some of this naming, but this seems like a good improvement regardless
--
PiperOrigin-RevId:
248827005
Stella Laurenzo [Sat, 18 May 2019 00:43:50 +0000 (17:43 -0700)]
Upstream the Quantizer tool (part 3).
This upstreams the config and constraints for a reference quantization scheme based on the FxpMathOps dialect.
There are probably two more CLs to get the rest: one with the passes/tests, and one with the tool main() itself.
--
PiperOrigin-RevId:
248817505
River Riddle [Sat, 18 May 2019 00:00:42 +0000 (17:00 -0700)]
Add support for saving and restoring the insertion point of a FuncBuilder. This also updates the edsc::ScopedContext to use a single builder that saves/restores insertion points. This is necessary for using edscs within RewritePatterns.
--
PiperOrigin-RevId:
248812645
River Riddle [Fri, 17 May 2019 22:57:49 +0000 (15:57 -0700)]
Refactor PatternRewriter to inherit from FuncBuilder instead of Builder. This is necessary for allowing more complicated rewrites in the future that may do things like update the insertion point (e.g. for rewrites involving regions).
--
PiperOrigin-RevId:
248803153
Geoffrey Martin-Noble [Fri, 17 May 2019 22:23:44 +0000 (15:23 -0700)]
Also visit memref element type in AsmPrinter
--
PiperOrigin-RevId:
248797935
Alex Zinenko [Fri, 17 May 2019 22:03:39 +0000 (15:03 -0700)]
Enable EDSC API test running through lit
EDSC subsystem contains an API test which is a .cpp file calling the API in
question and producing IR. This IR is further checked using FileCheck and
should plug into lit. Provide a CMakeLists.txt to build the test and modify
the lit configuration to process the source file.
--
PiperOrigin-RevId:
248794443
Geoffrey Martin-Noble [Fri, 17 May 2019 21:32:25 +0000 (14:32 -0700)]
Allow for the case where ShapedType is a MemRef in fixed point math kernel utils
MemRef may soon be a subclass of ShapedType.
--
PiperOrigin-RevId:
248788950
River Riddle [Fri, 17 May 2019 15:28:41 +0000 (08:28 -0700)]
Refactor Attribute and Type to use 'classof' instead of 'kindof' internally. If a 'classof' method is not defined, a default implementation will invoke 'kindof' on a derived type. This allows for defining supplementary Attribute/Type classes that expose additional functionality, but do not have a specific kind value. An example of this can be seen in the 'Constant(Float|Index|Int)Ops' that derive from 'ConstantOp'.
--
PiperOrigin-RevId:
248724093
MLIR Team [Fri, 17 May 2019 13:04:14 +0000 (06:04 -0700)]
Fix use of variables only used in asserts.
This otherwise triggers "unused variable" errors in optimized build mode.
--
PiperOrigin-RevId:
248706350
Alex Zinenko [Fri, 17 May 2019 12:40:51 +0000 (05:40 -0700)]
Overload arithmetic operators for SDBM expressions
Provide an "unsafe" version of the overloaded arithmetic operators for SDBM
expressions. These operators expect the operands to be of the right SDBM
expression subtype and assert if they are not. They also perform simple
folding operations as well as some semantically correct operations that
construct an SDBM expression of a different subtype, e.g., a difference
expression if the RHS of an operator+ is a negated variable. These operators
are scoped in a namespace to allow for a future "safe" version of the operators
that propagates null expressions to denote the error state when expressions
have wrong subtypes.
--
PiperOrigin-RevId:
248704153
Alex Zinenko [Fri, 17 May 2019 12:25:07 +0000 (05:25 -0700)]
Implement SDBM and conversion between SDBM and lists of SDBMExpr
Implement the storage class for striped difference-bound matrices (SDBM) as a
container with a difference bounds matrix and a list of stripe expressions. An
SDBM defines an integer set. Provide conversion mechanisms between lists of
SDBM expressions treated as equalities with zero or less-than-or-equal
inequalities with zero.
--
PiperOrigin-RevId:
248702871
MLIR Team [Fri, 17 May 2019 03:08:07 +0000 (20:08 -0700)]
LLVM API updates.
--
PiperOrigin-RevId:
248651086
Jacques Pienaar [Fri, 17 May 2019 03:02:18 +0000 (20:02 -0700)]
Update cmake dependencies.
--
PiperOrigin-RevId:
248650428
Andy Davis [Thu, 16 May 2019 23:50:35 +0000 (16:50 -0700)]
Fixes a small bug in computing dependence direction vectors, where equality constraint can be created on the wrong loop IVs when source/sink of the dependence are at different loop depths. Adds unit tests for cases where source/sink of the dependence are at varying loop depths.
--
PiperOrigin-RevId:
248627490
Geoffrey Martin-Noble [Thu, 16 May 2019 22:18:49 +0000 (15:18 -0700)]
Simplify the verification of ExtractElementop.
Make it clear that it cares about the aggregate type being a vector or tensor and not just that it has a shape.
Remove redundant validation from the custom method that is now covered by the tablegen'ed verification
This is related to making MemRefs a ShapedType as well.
--
PiperOrigin-RevId:
248610443
Jacques Pienaar [Thu, 16 May 2019 21:12:18 +0000 (14:12 -0700)]
Expand ReturnOp error to include types. NFC.
Found it a bit easier to see what mismatches occurred when invoking passes doesn't match.
--
PiperOrigin-RevId:
248597286
Jacques Pienaar [Thu, 16 May 2019 19:57:35 +0000 (12:57 -0700)]
Don't fail verifying unranked shapes as being the same as this could be valid at runtime.
tensor<*xf32> could be a tensor<1xf32> at runtime but this verifyShapeMatch would return failure and say function is invalid.
--
PiperOrigin-RevId:
248583038
River Riddle [Thu, 16 May 2019 19:51:45 +0000 (12:51 -0700)]
Unify the 'constantFold' and 'fold' hooks on an operation into just 'fold'. This new unified fold hook will take constant attributes as operands, and may return an existing 'Value *' or a constant 'Attribute' when folding. This removes the awkward situation where a simple canonicalization like "sub(x,x)->0" had to be written as a canonicalization pattern as opposed to a fold.
--
PiperOrigin-RevId:
248582024
Nicolas Vasilache [Thu, 16 May 2019 18:57:36 +0000 (11:57 -0700)]
Add linalg.range_intersect conversion to LLVM.
This CL adds lowering for linalg.range_intersect into LLVM by computing:
* new_min <- max (range1.min, range2.min)
* new_max <- min (range1.max, range2.max)
* new_step <- range1.step * range2.step
--
PiperOrigin-RevId:
248571810
Nicolas Vasilache [Thu, 16 May 2019 15:15:10 +0000 (08:15 -0700)]
Add a linalg.range_intersect op.
This CL adds an operation whose purpose is to encode boundary conditions directly in the view type. In particular, full/partial tile distinction can
occur at the level of metadata only.
This CL also adopts a Linalg_Op pattern that is similar to Std_Op.
--
PiperOrigin-RevId:
248529469
Geoffrey Martin-Noble [Thu, 16 May 2019 07:12:45 +0000 (00:12 -0700)]
Rename VectorOrTensorType to ShapedType
This is in preparation for making it also support/be a parent class of MemRefType. MemRefs have similar shape/rank/element semantics and it would be useful to be able to use these same utilities for them.
This CL should not change any semantics and only change variables, types, string literals, and comments. In follow-up CLs I will prepare all callers to handle MemRef types or remove their dependence on ShapedType.
Discussion/Rationale in https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/cHLoyfGu8y8
--
PiperOrigin-RevId:
248476449
River Riddle [Thu, 16 May 2019 03:20:11 +0000 (20:20 -0700)]
Store the child function analysis maps of a ModuleAnalysisManager by unique_ptr instead of by-value.
--
PiperOrigin-RevId:
248456926
River Riddle [Wed, 15 May 2019 22:24:20 +0000 (15:24 -0700)]
Add a new tutorial document that details how to define Dialect Attributes and Types.
--
PiperOrigin-RevId:
248417063
Stella Laurenzo [Wed, 15 May 2019 22:04:20 +0000 (15:04 -0700)]
Upstreaming Quantizer tool (part 2).
This adds some additional core types and utilities, notably the constraint analysis graph (CAG) structures, associated metadata and configuration policy object base class.
The CAG is not particularly memory efficient as it stands now. I had started some work to turn it into a form that could be better managed by a bump pointer allocator but abandoned that for now in favor of having something that does semantically what I was going for as a starting point.
--
PiperOrigin-RevId:
248413133
Rob Suderman [Wed, 15 May 2019 18:18:18 +0000 (11:18 -0700)]
Fixed Attributes.h comment typo from vecctor to vector
--
PiperOrigin-RevId:
248369005
Nicolas Vasilache [Wed, 15 May 2019 16:26:27 +0000 (09:26 -0700)]
Cleanup linalg integration test
This CL performs post-commit cleanups.
It adds the ability to specify which shared libraries to load dynamically in ExecutionEngine. The linalg integration test is updated to use a shared library.
Additional minor cleanups related to LLVM lowering of Linalg are also included.
--
PiperOrigin-RevId:
248346589
River Riddle [Wed, 15 May 2019 16:10:52 +0000 (09:10 -0700)]
Add support for parsing/printing dialect defined attributes. This also adds support for a pretty syntax for dialects attributes that is synonymous with the pretty syntax for dialect types. This cl also adds a new attribute 'OpaqueAttr' that allows for roundtripping attributes attached to unregistered dialects.
Dialect attributes have the following syntax:
dialect-attribute ::= `#` dialect-namespace `<` `"` attr-data `"` `>`
dialect-attribute ::= `#` alias-name pretty-dialect-sym-body?
--
PiperOrigin-RevId:
248344416
Chris Lattner [Wed, 15 May 2019 14:54:28 +0000 (07:54 -0700)]
Remove some extraneous const qualifiers on Type, and 0b1 -> 1 in tblgen files. (NFC)
--
PiperOrigin-RevId:
248332674
Nicolas Vasilache [Wed, 15 May 2019 07:53:01 +0000 (00:53 -0700)]
Make Linalg tiling a FunctionPass instead of a ModulePass - NFC
--
PiperOrigin-RevId:
248286354
River Riddle [Wed, 15 May 2019 06:01:35 +0000 (23:01 -0700)]
Add a new document detailing the diagnostics infrastructure.
--
PiperOrigin-RevId:
248275851
Stella Laurenzo [Wed, 15 May 2019 02:50:24 +0000 (19:50 -0700)]
Start to introduce the "Quantizer" tool, which is responsible for transforming a computation expressed in floating point to one operating in terms of quantized types (where possible), either using quant-aware-training hints where available or post-training statistics.
This is being integrated from an experimental side repository piece by piece over the course of several patches and will ultimately include full build support, documentation and e2e tests.
--
PiperOrigin-RevId:
248259895
Nicolas Vasilache [Wed, 15 May 2019 02:37:48 +0000 (19:37 -0700)]
Add support for a Linalg base op class
This CL uses a pattern proposed by aminim@ to add a base Linalg op that further dispatches to the proper op implementation.
This CL adds a LinalgOp which implements isclassof for only a subset of the linalg ops: the ops that behave like a library call for the purpose of transformations like tiling.
This uses a static dispatch mechanism based on the LinalgLibraryOps.td ops declarations to avoid switch or visitor patterns. This may later be replaced by Tablegen'd dispatch when it is available.
As a consequence, the list of library like operations in Linalg may now grow without having to modify any of the dispatch or transformation support.
More details in the concept-based dispatch, as explained by aminim@
```
This is inspired by Sean Parent's: https://sean-parent.stlab.cc/papers-and-presentations/#value-semantics-and-concept-based-polymorphism
A key difference is that the set of classes erased is statically known, which avoids to use dynamic memory allocation.
We use a zero-sized templated class to emit the virtual table and generate a singleton object for each instantiation of this class. We pay the cost of initialization once on construction (find which class to dispatch to) and then a virtual dispatch on every call.
```
--
PiperOrigin-RevId:
248258921
Jacques Pienaar [Tue, 14 May 2019 22:03:48 +0000 (15:03 -0700)]
Remove unnecessary C++ specifier in CPP files. NFC.
These are only required in .h files to disambiguate between C and C++ header files.
--
PiperOrigin-RevId:
248219135
Nicolas Vasilache [Tue, 14 May 2019 19:21:42 +0000 (12:21 -0700)]
Add an AffineExpr matcher
This CL gives a pattern-matching-y look and feel to AffineExpr.
For now this uses a shared_ptr instead of unique'ing into a bumpPtrAllocator.
SDBM gives a simple use case with more idiomatic syntax for matchers.
--
PiperOrigin-RevId:
248188075
Stella Laurenzo [Tue, 14 May 2019 18:03:55 +0000 (11:03 -0700)]
Move Quantization -> Dialect/QuantOps, FxpMathOps -> Dialect/FxpMathOps.
Adding the additional layer of directory was discussed offline and matches the Target/ tree. The names match the defacto convention we seem to be following where the C++ namespace is ^(.+)Ops/$ matched against the directory name.
This is in preparation for patching the Quantizer into this tree, which would have been confusing without moving the Quantization dialect to its more proper home. It is left to others to move other dialects if desired.
Tested:
ninja check-mlir
--
PiperOrigin-RevId:
248171982
River Riddle [Tue, 14 May 2019 16:29:30 +0000 (09:29 -0700)]
When converting a location to an SMLoc, advance to the first non-whitespace if the column is unknown(zero). This also fixes a small bug with call stack printing.
Example:
/tmp/file_C.py:21:5: error: 'foo.bar' op attribute 'something'
raise app.UsageError('Too many command-line arguments.')
^
/tmp/file_D.py:20:3: note: called from
if len(argv) > 1:
^
/tmp/file_E.py:19:1: note: called from
def main(argv):
^
/tmp/file_F.py:24:3: note: called from
app.run(main)
^
--
PiperOrigin-RevId:
248151212
Lei Zhang [Tue, 14 May 2019 16:08:41 +0000 (09:08 -0700)]
[ODS] Add definition for TypeAttr
--
PiperOrigin-RevId:
248147938
Jacques Pienaar [Tue, 14 May 2019 15:27:32 +0000 (08:27 -0700)]
Move specification of print, parse and verify to Std_Op base.
Removes some boilerplate in ops, add support to refer to C++ class name from parser function specification in ODS.
--
PiperOrigin-RevId:
248140977
River Riddle [Tue, 14 May 2019 05:24:48 +0000 (22:24 -0700)]
Add initial support to the SourceMgrDiagnosticHandler for printing call stacks.
Example:
/tmp/file_C.py:17:1: error: 'foo.bar' op attribute 'something' ...
app.run(main)
^
/tmp/file_D.py:14:1: note: called from
raise app.UsageError('Too many command-line arguments.')
^
/tmp/file_E.py:12:1: note: called from
def main(argv):
^
/tmp/file_F.py:13:1: note: called from
if len(argv) > 1:
^
--
PiperOrigin-RevId:
248074804
Stella Laurenzo [Tue, 14 May 2019 01:10:48 +0000 (18:10 -0700)]
Fix lingering sign compare warnings in exposed by "ninja check-mlir".
--
PiperOrigin-RevId:
248050178
Nicolas Vasilache [Mon, 13 May 2019 21:59:55 +0000 (14:59 -0700)]
Add a linalg.dim
A linalg.dim operation is used to extract size information from !linalg.view objects passed
through function call boundaries.
--
PiperOrigin-RevId:
248017488
River Riddle [Mon, 13 May 2019 21:45:48 +0000 (14:45 -0700)]
Refactor NameLoc so that it also holds a child location. This removes the awkward use of CallSiteLoc as a variable usage location.
--
PiperOrigin-RevId:
248014642
Lei Zhang [Mon, 13 May 2019 21:39:27 +0000 (14:39 -0700)]
Update "Table-driven Op Definition Specification" doc
This CL turns the previous "Op Definition" doc into a manual for table-driven
op definition specification by fleshing out more details of existing mechanisms.
--
PiperOrigin-RevId:
248013274
Jacques Pienaar [Mon, 13 May 2019 21:04:17 +0000 (14:04 -0700)]
Fix -Wsign-compare in Toy LateLowering.
--
PiperOrigin-RevId:
248005642
Jacques Pienaar [Mon, 13 May 2019 19:49:40 +0000 (12:49 -0700)]
Remove unused function and avoid unused variable warning. NFC.
--
PiperOrigin-RevId:
247991231
River Riddle [Mon, 13 May 2019 19:42:25 +0000 (12:42 -0700)]
Add a utility method to MLIRContext get a registered dialect with the 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
River Riddle [Mon, 13 May 2019 19:34:42 +0000 (12:34 -0700)]
Use the DialectSymbolRegistry to reserve space in the Attribute::Kind enum to allow for dialects to define attribute kinds. The currently defined attributes kinds have now been moved to StandardAttributes.
--
PiperOrigin-RevId:
247988373
River Riddle [Mon, 13 May 2019 18:56:21 +0000 (11:56 -0700)]
Move MemRefCastOp and TensorCastOp to the Op Definition Generation framework.
--
PiperOrigin-RevId:
247981385
River Riddle [Mon, 13 May 2019 18:53:14 +0000 (11:53 -0700)]
Move the definition of Return op to the Op Definition Generation framework.
--
PiperOrigin-RevId:
247980849
River Riddle [Mon, 13 May 2019 18:44:24 +0000 (11:44 -0700)]
NFC: Cleanup the definitions of the Location classes.
--
PiperOrigin-RevId:
247979132
River Riddle [Mon, 13 May 2019 18:43:17 +0000 (11:43 -0700)]
Change a few errors emitted by the parser to be notes instead.
--
PiperOrigin-RevId:
247978922
Andy Davis [Mon, 13 May 2019 18:05:59 +0000 (11:05 -0700)]
Move Affine Expressions and Affine Structures documentation from LangRef to Affine Dialect doc.
--
PiperOrigin-RevId:
247971222
Nicolas Vasilache [Mon, 13 May 2019 17:59:04 +0000 (10:59 -0700)]
Pipe Linalg to a cblas call via mlir-cpu-runner
This CL extends the execution engine to allow the additional resolution of symbols names
that have been registered explicitly. This allows linking static library symbols that have not been explicitly exported with the -rdynamic linking flag (which is deemed too intrusive).
--
PiperOrigin-RevId:
247969504
Tamas Berghammer [Mon, 13 May 2019 16:29:53 +0000 (09:29 -0700)]
Add test for affine-loop-tile pass with a loop of trip count 1
--
PiperOrigin-RevId:
247950156
Jacques Pienaar [Mon, 13 May 2019 16:09:00 +0000 (09:09 -0700)]
Update cmakelist to reflect renamed filename.
--
PiperOrigin-RevId:
247946677
River Riddle [Mon, 13 May 2019 16:00:22 +0000 (09:00 -0700)]
Refactor the includes of Function.h now that the dependency on Operation has been removed. The dependency was on the op casting methods, which have now moved out of Operation, used by the walker.
--
PiperOrigin-RevId:
247944666
Alex Zinenko [Mon, 13 May 2019 15:51:34 +0000 (08:51 -0700)]
Update region documentation
Restructure the Regions section in LangRef to avoid having a wall of text and
reflect a recent evolution of the design. Unspecify region types, that are put
on hold until use cases arise.
Update the Rationale doc with a list of design decisions related to regions.
Separately list the design alternatives that were considered and discarded due
to the lack of existing use cases.
--
PiperOrigin-RevId:
247943144
Andy Davis [Mon, 13 May 2019 13:57:56 +0000 (06:57 -0700)]
Factor out loop interchange code from LoopFusion into LoopUtils (NFC).
--
PiperOrigin-RevId:
247926512
River Riddle [Sun, 12 May 2019 02:51:16 +0000 (19:51 -0700)]
Remove the explicit "friend Operation" statement from each of the derived operations now that op casting is no longer inside of Operation.
--
PiperOrigin-RevId:
247791672
River Riddle [Sun, 12 May 2019 01:59:54 +0000 (18:59 -0700)]
Replace Operation::isa with llvm::isa.
--
PiperOrigin-RevId:
247789235
River Riddle [Sun, 12 May 2019 00:57:32 +0000 (17:57 -0700)]
Replace Operation::cast with llvm::cast.
--
PiperOrigin-RevId:
247785983
River Riddle [Sat, 11 May 2019 22:56:50 +0000 (15:56 -0700)]
Add support for using llvm::dyn_cast/cast/isa for operation casts and replace usages of Operation::dyn_cast with llvm::dyn_cast.
--
PiperOrigin-RevId:
247780086
MLIR Team [Sat, 11 May 2019 22:24:47 +0000 (15:24 -0700)]
Automated rollback of changelist
247778391.
PiperOrigin-RevId:
247778691
River Riddle [Sat, 11 May 2019 22:17:28 +0000 (15:17 -0700)]
Add support for using llvm::dyn_cast/cast/isa for operation casts and replace usages of Operation::dyn_cast with llvm::dyn_cast.
--
PiperOrigin-RevId:
247778391
River Riddle [Sat, 11 May 2019 19:45:35 +0000 (12:45 -0700)]
Rename Op::isClassFor to Op::classof to match the LLVM isa/dyn_cast standard naming scheme.
--
PiperOrigin-RevId:
247771192
River Riddle [Sat, 11 May 2019 18:59:01 +0000 (11:59 -0700)]
Remove several heavy includes from Diagnostics.h by a moving a couple of fields/methods to the .cpp file.
--
PiperOrigin-RevId:
247768443
Chris Lattner [Sat, 11 May 2019 18:50:29 +0000 (11:50 -0700)]
rename -memref-dependence-check to -test-memref-dependence-check since it
generates remarks for testing, it isn't itself a transformation.
While there, upgrade its diagnostic emission to use the streaming interface.
Prune some unnecessary #includes.
--
PiperOrigin-RevId:
247768062
River Riddle [Sat, 11 May 2019 16:53:26 +0000 (09:53 -0700)]
Remove some unnecessary or duplicated header includes from IR/.
--
PiperOrigin-RevId:
247762545
Chris Lattner [Sat, 11 May 2019 15:28:15 +0000 (08:28 -0700)]
Cleanups and simplifications to code, noticed by inspection. NFC.
--
PiperOrigin-RevId:
247758075
Mehdi Amini [Sat, 11 May 2019 02:21:21 +0000 (19:21 -0700)]
Revert "Pass for outlining gpu.launch operation bodies into kernel functions called by gpu.launch_func operations"
OSS build was broken (missing CMakeLists.txt changes and compilation failures on Ubuntu)
Automated rollback of changelist
247564213.
PiperOrigin-RevId:
247713812
River Riddle [Sat, 11 May 2019 00:47:32 +0000 (17:47 -0700)]
Change the diagnostic handler to accept Diagnostic instead of location/message/kind. This opens the door for many more powerful use cases: fixits, colors, etc.
--
PiperOrigin-RevId:
247705673
Lei Zhang [Fri, 10 May 2019 23:11:02 +0000 (16:11 -0700)]
[TableGen] Return base attribute's name for anonymous OptionalAttr/DefaultValuedAttr
--
PiperOrigin-RevId:
247693280
River Riddle [Fri, 10 May 2019 22:27:34 +0000 (15:27 -0700)]
Move the definitions for CallOp and IndirectCallOp to the Op Definition Generator.
--
PiperOrigin-RevId:
247686419
River Riddle [Fri, 10 May 2019 22:26:23 +0000 (15:26 -0700)]
Move the definitions of BranchOp, DimOp, and ExtractElementOp to Op Definition Generator.
--
PiperOrigin-RevId:
247686212
River Riddle [Fri, 10 May 2019 22:14:13 +0000 (15:14 -0700)]
Ensure that all attributes are registered with a dialect. This is one of the final steps towards allowing dialects to define their own attributes, but there are still several things missing before this is fully supported(e.g. parsing/printing ).
--
PiperOrigin-RevId:
247684322
River Riddle [Fri, 10 May 2019 22:00:53 +0000 (15:00 -0700)]
Add support to the SourceMgrDiagnosticHandlers to auto-load new source files seen in diagnostics.
--
PiperOrigin-RevId:
247681779
Mehdi Amini [Fri, 10 May 2019 21:06:10 +0000 (14:06 -0700)]
Add llvm_unreachable in unreachable path to silence GCC warning (NFC)
The switch is supposed to be fully covered, but GCC warns that:
"control reaches end of non-void function"
--
PiperOrigin-RevId:
247672430
Mehdi Amini [Fri, 10 May 2019 21:05:53 +0000 (14:05 -0700)]
Fix unused variable warning in the Toy tutorial (NFC)
--
PiperOrigin-RevId:
247672377
Mehdi Amini [Fri, 10 May 2019 21:05:34 +0000 (14:05 -0700)]
Remove unused method `parseIntegerSetInline` and `parseAffineMapInline` in Parser (NFC)
Fix GCC warning.
--
PiperOrigin-RevId:
247672318
Mehdi Amini [Fri, 10 May 2019 21:05:17 +0000 (14:05 -0700)]
Remove unused `signature()` from `OpMethod` class (private to mlir-tblgen) (NFC)
--
PiperOrigin-RevId:
247672280
Mehdi Amini [Fri, 10 May 2019 21:04:58 +0000 (14:04 -0700)]
Use `uint8_t` storage for enum class
This is intended to fix a GCC warning:
> mlir/lib/IR/LocationDetail.h:32:25: warning: ‘mlir::detail::LocationStorage::kind’ is too small to hold all values of ‘enum class mlir::Location::Kind’
--
PiperOrigin-RevId:
247672213
Mehdi Amini [Fri, 10 May 2019 20:54:11 +0000 (13:54 -0700)]
Remove extra `;` after function definition (NFC)
Fix a GCC warning
--
PiperOrigin-RevId:
247670176
Mehdi Amini [Fri, 10 May 2019 20:49:22 +0000 (13:49 -0700)]
Replace dyn_cast<> with isa<> when the returned value is unused (NFC)
Fix a gcc warning.
--
PiperOrigin-RevId:
247669360
River Riddle [Fri, 10 May 2019 20:10:08 +0000 (13:10 -0700)]
Refactor the SourceMgrDiagnosticHandlers to support more locations than FileLineColLoc.
--
PiperOrigin-RevId:
247662828
Mehdi Amini [Fri, 10 May 2019 18:33:21 +0000 (11:33 -0700)]
Remove unused Vectorize constructor (NFC)
Fix gcc warning.
--
PiperOrigin-RevId:
247647114
Mehdi Amini [Fri, 10 May 2019 16:29:20 +0000 (09:29 -0700)]
Remove unused `hasSingleNonZeroAt` function (NFC)
Fix clang warning.
--
PiperOrigin-RevId:
247623306
Mehdi Amini [Fri, 10 May 2019 16:21:37 +0000 (09:21 -0700)]
Make header-defined function inline instead of static (NFC)
Fix warning for unused function when the header is included in
an implementation file that does not use this function.
--
PiperOrigin-RevId:
247622232
River Riddle [Fri, 10 May 2019 16:12:44 +0000 (09:12 -0700)]
Templatize the integer constructors for DiagnosticArgument to avoid ambiguous conversions.
--
PiperOrigin-RevId:
247621058
Jacques Pienaar [Fri, 10 May 2019 15:51:34 +0000 (08:51 -0700)]
Emit cast instead of dyn_cast_or_null where attribute is required.
If the attribute needs to exist for the validity of the op, then no need to use
dyn_cast_or_null as the op would be invalid in the cases where cast fails, so
just use cast.
--
PiperOrigin-RevId:
247617696
Nicolas Vasilache [Fri, 10 May 2019 14:51:07 +0000 (07:51 -0700)]
Reorder edsc python tests - NFC
This CL orders the python tests to:
1. allow introspecting on the EdscTest class and avoid the error-prone process of having to add the test call by hand;
2. account for differences in the order of `dir(edscTest)` between python2, <= python3.5 and >= python 3.6
--
PiperOrigin-RevId:
247609687
River Riddle [Fri, 10 May 2019 14:13:03 +0000 (07:13 -0700)]
Add support to SourceMgrDiagnosticHandler for handling the case where the llvm::SourceMgr has no main file.
--
PiperOrigin-RevId:
247605584
Thomas Joerg [Fri, 10 May 2019 12:32:57 +0000 (05:32 -0700)]
Verify that kernel functions referenced by gpu.launch_func have a gpu.kernel attribute.
Also extract gpu.launch_func's function attribute name into a constant.
--
PiperOrigin-RevId:
247595352
Thomas Joerg [Fri, 10 May 2019 11:26:58 +0000 (04:26 -0700)]
Annotate outlined kernel functions with the attribute `gpu.kernel`.
--
PiperOrigin-RevId:
247589560
Thomas Joerg [Fri, 10 May 2019 09:23:18 +0000 (02:23 -0700)]
Add gpu.launch_func builder taking KernelDim3 arguments (NFC).
--
PiperOrigin-RevId:
247577649
Thomas Joerg [Fri, 10 May 2019 07:18:10 +0000 (00:18 -0700)]
Pass for outlining gpu.launch operation bodies into kernel functions called by gpu.launch_func operations.
--
PiperOrigin-RevId:
247564213
Mehdi Amini [Fri, 10 May 2019 06:08:13 +0000 (23:08 -0700)]
Remove unused PassID member from PassRegistry (NFC)
Fix clang warning
--
PiperOrigin-RevId:
247558931