[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] Disallow !emitc.opaque pointersFordbids to express pointer via the `!emitc.opaque` type. Point the userto use the `!emitc.ptr` type instead.Reviewed By: jpienaarDifferential Revi
[mlir][emitc] Disallow !emitc.opaque pointersFordbids to express pointer via the `!emitc.opaque` type. Point the userto use the `!emitc.ptr` type instead.Reviewed By: jpienaarDifferential Revision: https://reviews.llvm.org/D124002
[mlir][NFC] Update textual references of `func` to `func.func` in Bufferization/Complex/EmitC/CF/Func/GPU testsThe special case parsing of `func` operations is being removed.
[mlir][emitc] Add test for invalid typeReviewed By: jpienaarDifferential Revision: https://reviews.llvm.org/D123503
[mlir][emitc][nfc] Replace !emitc.opaque pointersReplaces `!emitc.opaque` types used to express pointers with`!emitc.ptr` types.
[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] 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] Change custom syntax of emitc.include op to resemble CThis changes the custom syntax of the emitc.include operation for standard includes.Reviewed By: marbreDifferential Revision: https:
[mlir] Change custom syntax of emitc.include op to resemble CThis changes the custom syntax of the emitc.include operation for standard includes.Reviewed By: marbreDifferential Revision: https://reviews.llvm.org/D105281
[mlir] Add EmitC dialectThis upstreams the EmitC dialect and the corresponding Cpp target, bothinitially presented with [1], from [2] to MLIR core. For the relateddiscussion, see [3].[1] https:
[mlir] Add EmitC dialectThis upstreams the EmitC dialect and the corresponding Cpp target, bothinitially presented with [1], from [2] to MLIR core. For the relateddiscussion, see [3].[1] https://reviews.llvm.org/D76571[2] https://github.com/iml130/mlir-emitc[3] https://llvm.discourse.group/t/emitc-generating-c-c-from-mlir/3388Co-authored-by: Jacques Pienaar <[email protected]>Co-authored-by: Simon Camphausen <[email protected]>Co-authored-by: Oliver Scherf <[email protected]>Reviewed By: rriddleDifferential Revision: https://reviews.llvm.org/D103969