| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
- This introduces a new FunctionParser base class to handle logic common
between the kinds of functions we have, e.g. ssa operand/def parsing.
- This introduces a basic symbol table (without support for forward
references!) and links defs and uses.
- CFG functions now parse and build operand lists for operations. The printer
isn't set up for them yet tho.
PiperOrigin-RevId: 205246110
|
|
|
|
|
|
|
|
| |
iterators, along with type specific ones.
Also provide mechanics to cast from Operation up to OperationStmt etc.
PiperOrigin-RevId: 205175333
|
|
|
|
| |
PiperOrigin-RevId: 205157390
|
|
|
|
|
|
|
|
|
|
|
| |
the instruction side of the house.
This has a number of limitations, including that we are still dropping
operands on the floor in the parser. Also, most of the convenience methods
aren't wired up yet. This is enough to get result type lists round tripping
through.
PiperOrigin-RevId: 205148223
|
|
|
|
| |
PiperOrigin-RevId: 205096519
|
|
|
|
| |
PiperOrigin-RevId: 204999887
|
|
|
|
|
|
|
| |
Refactors operation parsing to share functionality between CFG and ML functions. ML function construction now goes through a builder, similar to the way it is done for
CFG functions.
PiperOrigin-RevId: 204779279
|
|
|
|
| |
PiperOrigin-RevId: 204756982
|
|
|
|
|
|
| |
Allows printing the instruction to string without trailing newline. Making it easier to reuse print to annotate instructions during lowering. And removes need for newline in the print functions of ops.
PiperOrigin-RevId: 204630791
|
|
|
|
| |
PiperOrigin-RevId: 204614520
|
|
|
|
|
|
| |
Use LLVM double-link with parent list to store statements within a block.
PiperOrigin-RevId: 204515541
|
|
|
|
| |
PiperOrigin-RevId: 204399402
|
|
|
|
| |
PiperOrigin-RevId: 204240947
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
| |
use it.
This also removes "operand" from the affine expr classes: it is unnecessary
verbosity and "operand" will mean something very specific for SSA stuff (we
will have an Operand type).
PiperOrigin-RevId: 203976504
|
|
|
|
|
|
| |
class for operation printing. FunctionState class is a base class for CFGFunctionState and MLFunctionState classes. No parsing yet - will add once cl/203785893 is in.
PiperOrigin-RevId: 203862427
|
|
|
|
|
|
|
|
|
|
| |
- check for non-affine expressions
- handle negative numbers and negation of id's, expressions
- functions to check if a map is pure affine or semi-affine
- simplify/clean up affine map parsing code
- report more errors messages, more accurate error messages
PiperOrigin-RevId: 203773633
|
|
|
|
|
|
| |
prone to create things.
PiperOrigin-RevId: 203703229
|
|
|
|
|
|
|
| |
This avoids fall-through error in opt mode:
error: unannotated fall-through between switch labels
[-Werror,-Wimplicit-fallthrough]
PiperOrigin-RevId: 203616256
|
|
|
|
|
|
| |
own requirements.
PiperOrigin-RevId: 203497491
|
|
|
|
|
|
|
|
|
| |
reducing the memory impact on Operation to one word instead of 3 from an
std::vector.
Implement Jacques' suggestion to merge OpImpl::Storage into OpImpl::Base.
PiperOrigin-RevId: 203426518
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
properties:
- They allow type checked dynamic casting from their base Operation.
- They allow nice accessors for C++ clients, e.g. a "getIndex()" method on
'dim' that returns an unsigned.
- They work with both OperationInst/OperationStmt (once OperationStmt is
implemented).
- They get custom printing logic. They will eventually get custom parsing,
verifier, and builder logic as well.
- Out of tree clients can register their own operation set without having to
change MLIR core, e.g. for TensorFlow or custom target instructions.
This registers addf and dim as examples.
PiperOrigin-RevId: 203382993
|
|
|
|
|
|
|
| |
for attributes on operations. Split Operation out from OperationInst so it
can be shared with OperationStmt one day.
PiperOrigin-RevId: 203325366
|
|
|
|
| |
PiperOrigin-RevId: 203293376
|
|
|
|
|
|
| |
Instruction and AffineExpr. NFC.
PiperOrigin-RevId: 203287117
|
|
|
|
| |
PiperOrigin-RevId: 203227287
|
|
|
|
|
|
|
|
| |
A recursive descent parser for affine maps/expressions with operator precedence and
associativity. (While on this, sketch out uniqui'ing functionality for affine maps
and affine binary op expressions (partly).)
PiperOrigin-RevId: 203222063
|
|
|
|
|
|
| |
if statement conditions are not yet supported.
PiperOrigin-RevId: 203211526
|
|
|
|
|
|
|
| |
in a container automatically maintain their parent pointers, and change storage
from std::vector to the proper llvm::iplist type.
PiperOrigin-RevId: 202889037
|
|
|
|
|
|
|
|
|
| |
important for low-bitwidth inference cases and hardware synthesis targets.
Rename 'int' to 'affineint' to avoid confusion between "the integers" and "the int
type".
PiperOrigin-RevId: 202751508
|
|
|
|
|
|
|
|
|
|
|
| |
Run test case:
$ mlir-opt test/IR/parser-affine-map.mlir
test/IR/parser-affine-map.mlir:3:30: error: expect '(' at start of map range
#hello_world2 (i, j) [s0] -> i+s0, j)
^
PiperOrigin-RevId: 202736856
|
|
|
|
|
|
|
|
|
|
| |
class.
Introduce an Identifier class to MLIRContext to represent uniqued identifiers,
introduce string literal support to the lexer, introducing parser and printer
support etc.
PiperOrigin-RevId: 202592007
|
|
|
|
|
|
|
| |
Representing function arguments is still TODO.
Supporting instructions other than return is also TODO.
PiperOrigin-RevId: 202570934
|
|
|
|
|
|
|
|
| |
- parsing affine map identifiers
- place-holder classes for AffineMap
- module contains a list of affine maps (defined at the top level).
PiperOrigin-RevId: 202336919
|
|
|
|
|
|
| |
references.
PiperOrigin-RevId: 201872745
|
|
|
|
| |
PiperOrigin-RevId: 201830967
|
|
|
|
| |
PiperOrigin-RevId: 201830793
|
|
|
|
|
|
|
|
|
|
| |
instruction.
This is pretty much minimal scaffolding for this step. Basic block arguments,
instructions, other terminators, a proper IR representation for
blocks/instructions, etc are all coming.
PiperOrigin-RevId: 201826439
|
|
|
|
|
|
|
|
|
| |
vector types.
tensors and memref types are still TODO, and would be a good starter project
for someone.
PiperOrigin-RevId: 201782748
|
|
|
|
|
|
|
| |
filename, and printing of trivial stuff. There is no parser yet, so the
input file is ignored.
PiperOrigin-RevId: 201596916
|
|
PiperOrigin-RevId: 201540159
|