llvm-project/mlir/lib/EDSC
Alex Zinenko 80e38b6204 Python bindings: expose boolean and comparison operators
In particular, expose comparison operators as Python operator overloads on
ValueHandles.  The comparison currently emits signed integer comparisons only,
which is compatible with the behavior of emitter-based EDSC interface.  This is
sub-optimal and must be reconsidered in the future.  Note that comparison
operators are not overloaded in the C++ declarative builder API precisely
because this avoids the premature decision on the signedness of comparisons.

Implement the declarative construction of boolean expressions using
ValueHandles by overloading the boolean operators in the `op` namespace to
differentiate between `operator!` for nullity check and for boolean negation.
The operands must be of i1 type.  Also expose boolean operations as Python
operator overloads on ValueHandles.

PiperOrigin-RevId: 238421615
2019-03-29 17:17:47 -07:00
..
Builders.cpp Python bindings: expose boolean and comparison operators 2019-03-29 17:17:47 -07:00
Helpers.cpp Add support for custom ops in declarative builders. 2019-03-29 17:09:05 -07:00
Intrinsics.cpp [EDSC] Cleanup declarative builder insertion point with blocks 2019-03-29 17:09:51 -07:00
LowerEDSCTestPass.cpp Change Pass:getFunction() to return pointer instead of ref - NFC 2019-03-29 16:58:35 -07:00
MLIREmitter.cpp NFC. Move all of the remaining operations left in BuiltinOps to StandardOps. The only thing left in BuiltinOps are the core MLIR types. The standard types can't be moved because they are referenced within the IR directory, e.g. in things like Builder. 2019-03-29 16:53:35 -07:00
Types.cpp Set the namespace of the StandardOps dialect to "std", but add a special case to the parser to allow parsing standard operations without the "std" prefix. This will now allow for the standard dialect to be looked up dynamically by name. 2019-03-29 16:54:20 -07:00