llvm-project/mlir/test/mlir-tblgen
Chris Lattner 81467f500f [IR] Add a Location to BlockArgument
This adds the ability to specify a location when creating BlockArguments.
Notably Value::getLoc() will return this correctly, which makes diagnostics
more precise (e.g. the example in test-legalize-type-conversion.mlir).

This is currently optional to avoid breaking any existing code - if
absent, the BlockArgument defaults to using the location of its enclosing
operation (preserving existing behavior).

The bulk of this change is plumbing location tracking through the parser
and printer to make sure it can round trip (in -mlir-print-debuginfo
mode).  This is complete for generic operations, but requires manual
adoption for custom ops.

I added support for function-like ops to round trip their argument
locations - they print correctly, but when parsing the locations are
dropped on the floor.  I intend to fix this, but it will require more
invasive plumbing through "function_like_impl" stuff so I think it
best to split it out to its own patch.

This is a reapply of the patch here: https://reviews.llvm.org/D102567
with an additional change: we now never defer block argument locations,
guaranteeing that we can round trip correctly.

This isn't required in all cases, but allows us to hill climb here and
works around unrelated bugs like https://bugs.llvm.org/show_bug.cgi?id=50451

Differential Revision: https://reviews.llvm.org/D102991
2021-05-23 14:10:00 -07:00
..
attrdefs.td [mlir] Add support for adding attribute+type traits/interfaces to tablegen defs 2021-04-15 11:41:51 -07:00
dialect.td [mlir][ODS]: Add per-op cppNamespace. 2021-05-11 10:48:05 -07:00
directive-common.td [mlir][openacc] Use TableGen information for default enum 2021-01-12 09:42:42 -05:00
expect-symbol.td Use `not` to invert return code in expected to fail tests 2019-10-30 14:38:18 -07:00
interfaces.mlir [mlir] Allow for using interface class name in ODS interface definitions 2020-11-17 14:28:55 +01:00
llvm-intrinsics.td [mlir] Add an AccessGroup attribute to load/store LLVM dialect ops and generate the access_group LLVM metadata. 2021-03-04 18:17:23 +01:00
op-attribute.td [mlir][PDL] Add support for variadic operands and results in the PDL Interpreter 2021-03-16 13:20:19 -07:00
op-decl-and-defs.td [PatternMatch] Big mechanical rename OwningRewritePatternList -> RewritePatternSet and insert -> add. NFC 2021-03-22 17:20:50 -07:00
op-derived-attribute.mlir [MLIR] Add getSizeInBits() for tensor of complex 2020-08-07 12:38:49 -07:00
op-error.td [mlir] ODS: change OpBuilderDAG to OpBuilder 2021-03-04 10:55:02 +01:00
op-format-spec.td [mlir][OpAsmFormat] Add support for an "else" group on optional elements 2021-03-22 18:19:23 -07:00
op-format.mlir [mlir][OpAsmFormat] Add support for an "else" group on optional elements 2021-03-22 18:19:23 -07:00
op-interface.td [mlir] Allow for using interface class name in ODS interface definitions 2020-11-17 14:28:55 +01:00
op-operand.td [mlir-tblgen] Use fully qualified names in generated code files 2020-06-26 15:05:33 +02:00
op-python-bindings.td [mlir][Python] Roll up of python API fixes. 2021-01-24 19:02:59 -08:00
op-result.td [MLIR] Change default builders generated by TableGen to use TypeRange for result types 2020-09-23 09:06:07 -07:00
op-side-effects.td [mlir] Add support for referencing a SymbolRefAttr in a SideEffectInstance 2020-11-18 18:38:43 -08:00
pattern.mlir [IR] Add a Location to BlockArgument 2021-05-23 14:10:00 -07:00
predicate.td [mlir][OpDefGen] Add support for generating local functions for shared utilities 2020-12-14 14:21:30 -08:00
return-types.mlir Change filecheck default to dump input on failure 2020-06-09 18:57:46 +00:00
rewriter-errors.td Support NativeCodeCall binding in rewrite pattern. 2021-05-10 09:29:27 +08:00
rewriter-indexing.td [mlir][ODS] Get rid of limitations in rewriters generator 2021-03-18 12:21:06 +03:00
testdialect-attrdefs.mlir [mlir][AttrDefGen] Add support for specifying the value type of an attribute 2021-03-04 13:04:05 -08:00
testdialect-typedefs.mlir [MLIR] Add support for defining Types in tblgen 2020-10-14 00:32:18 +00:00
trait.mlir [MLIR] Add idempotent trait folding 2020-10-16 15:51:04 +00:00
typedefs.td Fix MLIR test post 890afad954 2021-03-09 23:30:51 +00:00
types.mlir [mlir] Print more verbose message in case of type inference error 2021-02-02 18:27:30 +00:00