summaryrefslogtreecommitdiffstats
path: root/mlir/unittests/SDBM/SDBMTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Adjust License.txt file to use the LLVM licenseMehdi Amini2019-12-231-13/+4
| | | | PiperOrigin-RevId: 286906740
* Fix minor spelling tweaks (NFC)Kazuaki Ishizaki2019-10-201-1/+1
| | | | | | Closes tensorflow/mlir#175 PiperOrigin-RevId: 275726876
* SDBM: support sum expressions on the LHS of stripe expressionsAlex Zinenko2019-09-181-2/+22
| | | | | | | | | Introduce support for applying the stripe operator to sum expressions, as in (x + A) # B = x + A - (x + A) mod B. This is required to represent a combination of tiling and padding in the SDBM framework, and is a valid SDBM construct that was not originally supported. PiperOrigin-RevId: 269758807
* Simplify SDBM expressions more aggressively in operators and conversionsAlex Zinenko2019-09-181-0/+14
| | | | | | | | | | | | Extend SDBM simplification patterns to support more cases where the addition of two expressions each involving one or two variables would result in a sum expression that only contains one variable and thus remains in the SDBM domain. This is made possible by the new canonical structure of SDBM where the constant term appears once. This simplification will be necessary to support round-tripping of stripe expressions containing constant terms on the LHS through affine expressions. PiperOrigin-RevId: 269757732
* Overhaul the SDBM expression kind hierarchyAlex Zinenko2019-09-161-4/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | Swap the allowed nesting of sum and diff expressions: now a diff expression can contain a sum expression, but only on the left hand side. A difference of two expressions sum must be canonicalized by grouping their constant terms in a single expression. This change of sturcture became possible thanks to the introduction of the "direct" super-kind. It is necessary to enable support of sum expressions on the left hand side of the stripe expression. SDBM expressions are now grouped into the following structure - expression - varying - direct - sum <- (term, constant) - term - symbol - dimension - stripe <- (term, constant) - negation <- (direct) - difference <- (direct, term) - constant The notation <- (...) denotes the types of subexpressions a compound expression can combine. PiperOrigin-RevId: 269337222
* Introduce SDBMDirect expression into the SDBM expression hierarchyAlex Zinenko2019-09-161-0/+4
| | | | | | | | | | Direct expressions are those that do not negate any of the variables they involve. They include input expressions (dimensions and symbols), stripe and sum expressions, and combinations of those. Reifying direct expressions as a class is a precondition for enabling additions on the LHS of a stripe expression. PiperOrigin-RevId: 269336031
* Rename SDBMPositiveExpr to SDBMTermExprAlex Zinenko2019-09-111-3/+3
| | | | | | | | | | | This better reflects how this kind of expressions is used and avoids the potential confusion since the expression can take negative values. Term expressions comprise dimensions, symbols and stripe expressions. In an SDBM domain, a stripe expression always corresponds to a variable, input or temporary. This expression can appear anywhere an input variable can, including on the LHS of other stripe expressions. PiperOrigin-RevId: 268486066
* Fix typos in SDBMTest.cppAlex Zinenko2019-09-111-2/+2
| | | | PiperOrigin-RevId: 268443146
* NFC: Move LLVMIR, SDBM, and StandardOps to the Dialect/ directory.River Riddle2019-08-191-3/+3
| | | | PiperOrigin-RevId: 264193915
* Move SDBM uniquer into the SDBM dialectAlex Zinenko2019-06-011-30/+41
| | | | | | | | | | | | | | MLIRContext does not have to be aware of the SDBM unique data structures directly. Move the SDBM storage uniquer from MLIRContext to the SDBM dialect instance. Expressions that previously required a context to be constructed now require an instance of the dialect in order to access the uniquer. While they could look up the dialect in the context, it would have introduced a rather expensive lookup into each construction. Instead, the caller is expected to obtain the dialect instance and cache it. -- PiperOrigin-RevId: 249245199
* Move SDBM infrastructure into a new SDBM dialectAlex Zinenko2019-06-011-0/+348
We now have sufficient extensibility in dialects to move attribute components such as SDBM out of the core IR into a dedicated dialect and make them optional. Introduce an SDBM dialect and move the code. This is a mostly non-functional change. -- PiperOrigin-RevId: 249244802
OpenPOWER on IntegriCloud