summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Operation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Continue wiring up diagnostic reporting infrastructure, still WIP.Chris Lattner2019-03-291-25/+15
| | | | | | | | | | | | - Implement a diagnostic hook in one of the paths in mlir-opt which captures and reports the diagnostics nicely. - Have the parser capture simple location information from the parser indicating where each op came from in the source .mlir file. - Add a verifyDominance() method to MLFuncVerifier to demo this, resolving b/112086163 - Add some PrettyStackTrace handlers to make crashes in the testsuite easier to track down. PiperOrigin-RevId: 207488548
* Enhance MLIRContext and operations with the ability to register diagnosticChris Lattner2019-03-291-0/+40
| | | | | | | | | | | | handlers and to feed them with errors and warnings produced by the compiler. Enhance Operation to be able to get its own MLIRContext on demand, simplifying some clients. Change the verifier to emit certain errors with the diagnostic handler. This is steps towards reworking the verifier and diagnostic propagation but is itself not particularly useful. More to come. PiperOrigin-RevId: 206948643
* Implement MLValue, statement operands, operation statement operands and ↵Tatiana Shpeisman2019-03-291-16/+5
| | | | | | values. ML functions now have full support for expressing operations. Induction variables, function arguments and return values are still todo. PiperOrigin-RevId: 206253643
* Add operand support to the Instruction base class. Add setOperand methodsChris Lattner2019-03-291-0/+11
| | | | | | | | | | | to all the things. Fill out the OneOperand trait class with support for getting and setting operands, allowing DimOp to have a working get/setOperand() method. I'm not thrilled with the extra template argument on OneOperand, I'll will investigate removing that in a follow-on patch. PiperOrigin-RevId: 205679696
* Implement generic operand/result iterators that map through our implementationChris Lattner2019-03-291-1/+49
| | | | | | | | | details, returning things in terms of values (which is what most clients want). Implement support for operands and results on Operation, and simplify the asmprinter to use it. PiperOrigin-RevId: 205608853
* Provide better factoring for the SSA types to allow type agnostic def/useChris Lattner2019-03-291-3/+3
| | | | | | | | iterators, along with type specific ones. Also provide mechanics to cast from Operation up to OperationStmt etc. PiperOrigin-RevId: 205175333
* Implement Uday's suggestion to unique attribute lists across instructions,Chris Lattner2019-03-291-9/+32
| | | | | | | | | reducing the memory impact on Operation to one word instead of 3 from an std::vector. Implement Jacques' suggestion to merge OpImpl::Storage into OpImpl::Base. PiperOrigin-RevId: 203426518
* Add the ability to have "Ops" defined as small C++ classes, with some niceChris Lattner2019-03-291-0/+17
| | | | | | | | | | | | | | | | | properties: - They allow type checked dynamic casting from their base Operation. - They allow nice accessors for C++ clients, e.g. a "getIndex()" method on 'dim' that returns an unsigned. - They work with both OperationInst/OperationStmt (once OperationStmt is implemented). - They get custom printing logic. They will eventually get custom parsing, verifier, and builder logic as well. - Out of tree clients can register their own operation set without having to change MLIR core, e.g. for TensorFlow or custom target instructions. This registers addf and dim as examples. PiperOrigin-RevId: 203382993
* Add parsing for attributes and attibutes on operations. Add IR representationChris Lattner2019-03-291-0/+40
for attributes on operations. Split Operation out from OperationInst so it can be shared with OperationStmt one day. PiperOrigin-RevId: 203325366
OpenPOWER on IntegriCloud