llvm-project/mlir
Uday Bondhugula b488a035aa Implement some simple affine expr canonicalization/simplification.
- fold constants when possible.
- for a mul expression, canonicalize to always keep the LHS as the
  constant/symbolic term, and similarly, the RHS for an add expression to keep
  it closer to the mathematical form. (Eg: f(x) = 3*x + 5)); other similar simplifications;
- verify binary op expressions at creation time.

TODO: we can completely drop AffineSubExpr, and instead use add and mul by -1.
This way something like x - 4 and -4 + x get canonicalized to x + -1 * 4
instead of being x - 4 and x + -4. (The other alternative if wanted to retain
AffineSubExpr would be to simplify x + -1*y to x - y and x + <neg number> to x
- <pos number>).
PiperOrigin-RevId: 204240258
2019-03-29 12:32:45 -07:00
..
include/mlir Implement some simple affine expr canonicalization/simplification. 2019-03-29 12:32:45 -07:00
lib Implement some simple affine expr canonicalization/simplification. 2019-03-29 12:32:45 -07:00
test/IR Implement some simple affine expr canonicalization/simplification. 2019-03-29 12:32:45 -07:00
tools/mlir-opt Expand check-parser-errors to match multiple errrors per line. 2019-03-29 12:30:35 -07:00
LICENSE.TXT Continue sketching out basic infrastructure, including an input and output 2019-03-29 12:23:51 -07:00