[mlir:Parser] Don't use strings for the "ugly" form of Attribute/Type syntaxThis commit refactors the syntax of "ugly" attribute/type formats to not usestrings for wrapping. This means that moving
[mlir:Parser] Don't use strings for the "ugly" form of Attribute/Type syntaxThis commit refactors the syntax of "ugly" attribute/type formats to not usestrings for wrapping. This means that moving forward attirbutes and type formatswill always need to be in some recognizable form, i.e. if they use incompatiblecharacters they will need to manually wrap those in a string, the framework willno longer do it automatically.This has the benefit of greatly simplifying how parsing attributes/types work, giventhat we currently rely on some extremely complicated nested parser logic which isquite problematic for a myriad of reasons; unecessary complexity(we create a nestedsource manager/lexer/etc.), diagnostic locations can be off/wrong given string escaping,etc.Differential Revision: https://reviews.llvm.org/D118505
show more ...
[mlir][emitc] Add a cast opThis adds a cast operation that allows to perform an explicit typeconversion. The cast op is emitted as a C-style cast. It can be appliedto integer, float, index and Em
[mlir][emitc] Add a cast opThis adds a cast operation that allows to perform an explicit typeconversion. The cast op is emitted as a C-style cast. It can be appliedto integer, float, index and EmitC types.Reviewed By: jpienaarDifferential Revision: https://reviews.llvm.org/D123514
[mlir][emitc] Replace !emitc.opaque pointersReplaces using !emitc.opaque pointers which using !emitc.ptr types.
[mlir][NFC] Update textual references of `func` to `func.func` in Pass/Target testsThe special case parsing of `func` operations is being removed.
[mlir] Move the Builtin FuncOp to the Func dialectThis commit moves FuncOp out of the builtin dialect, and into the Funcdialect. This move has been planned in some capacity from the momentwe made
[mlir] Move the Builtin FuncOp to the Func dialectThis commit moves FuncOp out of the builtin dialect, and into the Funcdialect. This move has been planned in some capacity from the momentwe made FuncOp an operation (years ago). This commit handles thefunctional aspects of the move, but various aspects are left untouchedto ease migration: func::FuncOp is re-exported into mlir to reducethe actual API churn, the assembly format still accepts the unqualified`func`. These temporary measures will remain for a little while tosimplify migration before being removed.Differential Revision: https://reviews.llvm.org/D121266
[mlir][emitc] Add a variable opThis adds a variable op, emitted as C/C++ locale variable, which can beused if the `emitc.constant` op is not sufficient.As an example, the canonicalization pass w
[mlir][emitc] Add a variable opThis adds a variable op, emitted as C/C++ locale variable, which can beused if the `emitc.constant` op is not sufficient.As an example, the canonicalization pass would transform```mlir%0 = "emitc.constant"() {value = 0 : i32} : () -> i32%1 = "emitc.constant"() {value = 0 : i32} : () -> i32%2 = emitc.apply "&"(%0) : (i32) -> !emitc.ptr<i32>%3 = emitc.apply "&"(%1) : (i32) -> !emitc.ptr<i32>emitc.call "write"(%2, %3) : (!emitc.ptr<i32>, !emitc.ptr<i32>) -> ()```into```mlir%0 = "emitc.constant"() {value = 0 : i32} : () -> i32%1 = emitc.apply "&"(%0) : (i32) -> !emitc.ptr<i32>%2 = emitc.apply "&"(%0) : (i32) -> !emitc.ptr<i32>emitc.call "write"(%1, %2) : (!emitc.ptr<i32>, !emitc.ptr<i32>) -> ()```resulting in pointer aliasing, as %1 and %2 point to the same address.In such a case, the `emitc.variable` operation can be used instead.Reviewed By: jpienaarDifferential Revision: https://reviews.llvm.org/D120098
[mlir][emitc] Add a pointer typeAdds a pointer type to EmitC. The emission of pointers is so far onlypossible by using the `emitc.opaque` typeCo-authored-by: Simon Camphausen <simon.camphausen@i
[mlir][emitc] Add a pointer typeAdds a pointer type to EmitC. The emission of pointers is so far onlypossible by using the `emitc.opaque` typeCo-authored-by: Simon Camphausen <[email protected]>Reviewed By: jpienaarDifferential Revision: https://reviews.llvm.org/D119337
[mlir] Split out a new ControlFlow dialect from StandardThis dialect is intended to model lower level/branch based control-flow constructs. The initial setof operations are: AssertOp, BranchOp, Co
[mlir] Split out a new ControlFlow dialect from StandardThis dialect is intended to model lower level/branch based control-flow constructs. The initial setof operations are: AssertOp, BranchOp, CondBranchOp, SwitchOp; all split out from the currentstandard dialect.See https://discourse.llvm.org/t/standard-dialect-the-final-chapter/6061Differential Revision: https://reviews.llvm.org/D118966
[mlir] Don't emit unused labelsStop the Cpp target from emitting unused labels. The previosly generatedcode generated warning if `-Wunused-label` is passed to a compiler.Co-authored-by: Simon Ca
[mlir] Don't emit unused labelsStop the Cpp target from emitting unused labels. The previosly generatedcode generated warning if `-Wunused-label` is passed to a compiler.Co-authored-by: Simon Camphausen <[email protected]>Reviewed By: jpienaarDifferential Revision: https://reviews.llvm.org/D118154
[MLIR] Replace std ops with arith dialect opsPrecursor: https://reviews.llvm.org/D110200Removed redundant ops from the standard dialect that were moved to the`arith` or `math` dialects.Renamed
[MLIR] Replace std ops with arith dialect opsPrecursor: https://reviews.llvm.org/D110200Removed redundant ops from the standard dialect that were moved to the`arith` or `math` dialects.Renamed all instances of operations in the codebase and in tests.Reviewed By: rriddle, jpienaarDifferential Revision: https://reviews.llvm.org/D110797
[mlir] Fix printing of EmitC attrs/types with escape charactersAttributes and types were not escaped when printing.Reviewed By: jpienaar, marbreDifferential Revision: https://reviews.llvm.org/D
[mlir] Fix printing of EmitC attrs/types with escape charactersAttributes and types were not escaped when printing.Reviewed By: jpienaar, marbreDifferential Revision: https://reviews.llvm.org/D109143
[mlir][emitc] Print signed integers properlyPreviously negative integers were printed as large unsigned values.Reviewed By: marbreDifferential Revision: https://reviews.llvm.org/D109690
[mlir] Add Cpp emitterThis upstreams the Cpp emitter, initially presented with [1], from [2]to MLIR core. Together with the previously upstreamed EmitC dialect [3],the target allows to translate
[mlir] Add Cpp emitterThis upstreams the Cpp emitter, initially presented with [1], from [2]to MLIR core. Together with the previously upstreamed EmitC dialect [3],the target allows to translate MLIR to C/C++.[1] https://reviews.llvm.org/D76571[2] https://github.com/iml130/mlir-emitc[3] https://reviews.llvm.org/D103969Co-authored-by: Jacques Pienaar <[email protected]>Co-authored-by: Simon Camphausen <[email protected]>Co-authored-by: Oliver Scherf <[email protected]>Reviewed By: jpienaarDifferential Revision: https://reviews.llvm.org/D104632