Commit Graph

3216 Commits

Author SHA1 Message Date
MLIR Team 8901448f14 Add some scaffolding for parsing affine maps:
- parsing affine map identifiers
- place-holder classes for AffineMap
- module contains a list of affine maps (defined at the top level).

PiperOrigin-RevId: 202336919
2019-03-29 12:26:28 -07:00
Jacques Pienaar c7fe8c38a5 Report parsing error check failures wrt file being parsed.
For checking parse errors, the input file is split and failures reported per memory buffer. Simply reporting the errors loses the mapping back to the original file. Change the reporting to instead relate the error reported back to the original file.

Use SourceMgr's PrintMessage consistently for errors and relates back to file being parsed.

PiperOrigin-RevId: 202136152
2019-03-29 12:26:16 -07:00
Jacques Pienaar 39a33a2568 Change error verification of parser error checking.
Change from using FileCheck to directly verifying the message (simple substring checking) and line number of the error.

PiperOrigin-RevId: 201955181
2019-03-29 12:26:02 -07:00
Jacques Pienaar b11a95350f Change Lexer and Parser to take diagnostic reporter function.
Add diagnostic reporter function to lexer/parser and use that from mlir-opt to report errors instead of having the lexer/parser print the errors.

PiperOrigin-RevId: 201892004
2019-03-29 12:25:48 -07:00
Chris Lattner 2b6684cfbe Add the unconditional branch instruction, improve diagnostics for block
references.

PiperOrigin-RevId: 201872745
2019-03-29 12:25:35 -07:00
Jacques Pienaar a5fb2f47e1 Add negative parsing tests using mlir-opt.
Add parsing tests with errors. Follows direct path of splitting file into test groups (using a marker) and parsing each section individually. The expected errors are checked using FileCheck and parser error does not result in terminating parsing the rest of the file if check-parser-error.

This is an interim approach until refactoring lexer/parser.

PiperOrigin-RevId: 201867941
2019-03-29 12:25:23 -07:00
MLIR Team 81f5332e45 Remove unused UnrankedTensorTypeKeyInfo.
PiperOrigin-RevId: 201830967
2019-03-29 12:25:11 -07:00
MLIR Team 642f3e8847 Add tensor type.
PiperOrigin-RevId: 201830793
2019-03-29 12:24:58 -07:00
Chris Lattner 80b6bd24b3 Implement parser/IR support for CFG functions, basic blocks and return instruction.
This is pretty much minimal scaffolding for this step.  Basic block arguments,
instructions, other terminators, a proper IR representation for
blocks/instructions, etc are all coming.

PiperOrigin-RevId: 201826439
2019-03-29 12:24:45 -07:00
Chris Lattner 49795d166f Introduce IR support for MLIRContext, primitive types, function types, and
vector types.

tensors and memref types are still TODO, and would be a good starter project
for someone.

PiperOrigin-RevId: 201782748
2019-03-29 12:24:32 -07:00
Chris Lattner 23b784a1bb Implement parser and lexer support for most of the type grammar.
Semi-affine maps and address spaces are not yet supported (someone want to take
this on?).  We also don't generate IR objects for types yet, which I plan to
tackle next.

PiperOrigin-RevId: 201754283
2019-03-29 12:24:20 -07:00
Chris Lattner 9b9f7ff5d4 Implement enough of a lexer and parser for MLIR to parse extfunc's without
arguments.

PiperOrigin-RevId: 201706570
2019-03-29 12:24:05 -07:00
Chris Lattner 5fc587ecf8 Continue sketching out basic infrastructure, including an input and output
filename, and printing of trivial stuff.  There is no parser yet, so the
input file is ignored.

PiperOrigin-RevId: 201596916
2019-03-29 12:23:51 -07:00
MLIR Team 80a03c80a9 [MLIR] Enable lit test driver for simple check test.
PiperOrigin-RevId: 201554536
2019-03-29 12:23:38 -07:00
Chris Lattner 9603f9fe35 Sketch out a new repository for the mlir project (go/mlir).
PiperOrigin-RevId: 201540159
2019-03-29 12:23:24 -07:00
jpienaar aed0d21a62 Create README.md 2019-03-29 12:22:52 -07:00