5 Commits

Author SHA1 Message Date
Ramkumar Ramachandra
db791b278a
mlir/LogicalResult: move into llvm (#97309)
This patch is part of a project to move the Presburger library into
LLVM.
2024-07-02 10:42:33 +01:00
Jeremy Kun
2ff43ce87e
Restore #91137 (#92003)
#91137 reverted in #92001

A build error fix added in 28d5ece8ca93ef04fee9b0258b70b750b66c05ca

---------

Co-authored-by: Jeremy Kun <j2kun@users.noreply.github.com>
2024-05-14 09:45:39 -07:00
Jeremy Kun
ad727b1a67
Revert "Support polynomial attributes with floating point coefficients (#91137)" (#92001)
This reverts commit 91a14dbf825b79ff143d1b16124763a4a80facab.

Not sure how to fix the build error this introduced, so reverting until
I can figure it out

https://lab.llvm.org/buildbot/#/builders/264/builds/10468

Co-authored-by: Jeremy Kun <j2kun@users.noreply.github.com>
2024-05-13 10:19:59 -07:00
Jeremy Kun
91a14dbf82
Support polynomial attributes with floating point coefficients (#91137)
In summary:

- `Monomial` -> `MonomialBase` with two inheriting `IntMonomial` and
`FloatMonomial` for the different coefficient types
- `Polynomial` -> `PolynomialBase` with `IntPolynomial` and
`FloatPolynomial` inheriting
- `PolynomialAttr` -> `IntPolynomialAttr`, and new `FloatPolynomialAttr`
attribute, both of which may be input to `polynomial.constant`
- Refactoring common parts of attribute parsers.

---------

Co-authored-by: Jeremy Kun <j2kun@users.noreply.github.com>
2024-05-13 09:47:34 -07:00
Jeremy Kun
55b6f17071
Add a polynomial dialect shell, attributes, and types (#72081)
RFC:
https://discourse.llvm.org/t/rfc-a-poly-dialect-for-polynomial-arithmetic/73891

This PR implements the minimal work needed to represent the polynomial
type such that it can be tested with `lit`.

In this PR:

- Dialect shell
- `Polynomial` data structure needed for folding
- Polynomial attributes (`PolynomialAttr` and `RingAttr` which store a polynomial)
- `polynomial.polynomial` type
- Basic lit tests

---------

Co-authored-by: Jeremy Kun <j2kun@users.noreply.github.com>
2024-04-15 09:12:00 -07:00