Commit Graph

10 Commits (b21b5322f63b6bd1736be6ef3b1787656c4fd930)

Author SHA1 Message Date
Stella Laurenzo e18e8e0a96 Add boolean/logical operations (and, or, not).
* Adds a new to_boolean op to evaluate a value as a truthy i1
* Uses cascading scf.if ops to properly evaluate and/or sequences (short-circuit and original value returning)
* Adds a helper to construct select ops and uses it to implement 'not'
2020-06-09 00:01:21 -07:00
Stella Laurenzo 1ef3614682 Add support for short-circuit comparisons with scf.if. 2020-06-08 17:52:07 -07:00
Stella Laurenzo a32219c3bb Refactor things so that an SCF mixin dialect helper can be used.
* Makes the OpBuilder an input to the DialectHelper.
* The containment hierarchy can be simplified further.
* There are still only a few places this is instantiated, so opting for working over great.
2020-06-08 16:10:51 -07:00
Stella Laurenzo 28048337ae Fix issue with float_attr. 2020-06-06 22:01:38 -07:00
Stella Laurenzo 0cc0a7165e Add basic AST -> basicpy dialect function extraction.
* Extends the bindings to support locations.
* Various other things necessary to extract a function with simple numeric expressions.
2020-06-06 21:24:28 -07:00
Stella Laurenzo 60f132b26f Add pass registrations and a simple compilation example from python.
* Got side-tracked hunting down a vague-linkage RTTI issue due to not anchoring key methods in PassOptions.h to a module.
* Took the path of least resistance and just added the option to build LLVM with RTTI. I know how to fix this but would like to do some broader upstream fixes versus just hunting/pecking/working around in this project.
2020-06-03 23:58:58 -07:00
Stella Laurenzo f2985e0901 Add implicit constant capture.
We want more sophisticated capture later, but this allows basics to function.
2020-05-08 17:55:02 -07:00
Stella Laurenzo 8ae71a9551 Add MLIRContext.dense_elements_attr to create an attribute from a python buffer/array. 2020-05-08 17:36:07 -07:00
Stella Laurenzo a91b0bfbe1 Add numpy.get_slice op and wire it up to the tracer. 2020-05-08 16:04:58 -07:00
Stella Laurenzo 3611958b11 Move python native library to python_native/_npcomp...so.
This allows binary and source packages to exist at different physical paths.
2020-05-06 22:44:12 -07:00