[qt/clang/llvm]: Summary of bulk changes made
KDE Git Services - Bulk Change <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git repository change summary for qt/clang/llvm Pushed by mirror-service into branch 'upstream/users/makslevental/mlir-c-typeconverter-1ton'. Changed from 5c30a1e03b30af3853f61ca97b1dc710ce0ee971 to 66915160f8e134c66f8fa95854c05d9607b96ece Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository. This change contains the following new commits: Git commit 4c716e5e3934ff57b593aa33374bd4438c34e793 by makslevental on 21/07/2026 at 19:38.. [mlir-c] Use a tri-state status enum for the type conversion callback MlirTypeConverterConversionCallback returned MlirLogicalResult and used a null convertedType as a second failure sentinel, which could only express success or "try another conversion" -- and conflated the C++ decline (std::nullopt) and hard-failure (failure()) states. Introduce MlirTypeConverterConversionStatus (Success/Failure/Declined) and return it from the callback instead, mapping the three states to success(), failure(), and std::nullopt respectively. Update the Python binding and the C API test callback accordingly. Add a C API unit test (testTypeConverterConversionStatus) exercising all three status values through mlirTypeConverterConvertType. https://invent.kde.org/qt/clang/llvm/-/commit/4c716e5e3934ff57b593aa33374bd4438c34e793 Git commit d692a3d9e4a4067215ac7ef2331cd218e0b6e712 by makslevental on 21/07/2026 at 21:29.. [mlir-c] Add 1:N TypeConverter conversion and materialization bindings Builds on the source/target materialization C bindings: - Target materialization callbacks now receive `originalType` (split from the previously-shared source/target callback typedef), exposing a documented C++ capability that was otherwise unreachable from C. - 1:N type conversion: `mlirTypeConverterAdd1ToNConversion` plus an opaque results accumulator (`MlirTypeConverterConversionResults` / `mlirTypeConverterConversionResultsAppend`). A declining callback's appended types are rolled back so the driver's "try the next conversion" invariant holds. - 1:N target materialization: `mlirTypeConverterAdd1ToNTargetMaterialization`, whose callback fills a caller-allocated `outputs` buffer. A success that leaves any output null is treated as a decline rather than handing the driver a null-containing result. - `mlirConversionPatternRewriterReplaceOpWithMultiple` for 1:N value replacement, which can drive a source materialization with nInputs > 1. - An optional `matchAndRewrite1ToN` callback on `MlirConversionPatternCallbacks` for patterns consuming 1:N-remapped operands; when null the driver falls back to the 1:1 dispatch. Adds end-to-end tests in mlir/test/CAPI/rewrite.c covering originalType observation, source/target materialization decline paths, 1:N conversion (including append-then-decline rollback and erasure), 1:N target materialization (including the unfilled-outputs decline), multi-input source materialization, multi-range replaceOpWithMultiple, and the 1:1-only-pattern vs 1:N-operand failure. https://invent.kde.org/qt/clang/llvm/-/commit/d692a3d9e4a4067215ac7ef2331cd218e0b6e712 Git commit aa679b76d2e4485d80ed1c56185af991c4be6fed by makslevental on 21/07/2026 at 21:29.. [mlir-c] Fix -Wmissing-field-initializers in rewrite.c test The new matchAndRewrite1ToN field left three existing MlirConversionPatternCallbacks initializers under-initialized, which fails the CI build under -Werror=-Wmissing-field-initializers. https://invent.kde.org/qt/clang/llvm/-/commit/aa679b76d2e4485d80ed1c56185af991c4be6fed Git commit 31317487652aa73b63b8bfa7f37fb23b3e17dfec by makslevental on 21/07/2026 at 21:29.. [mlir-c] Value-initialize MlirConversionPatternCallbacks in Python bindings The Python conversion-pattern binding left the struct default-initialized, so the newly-added optional matchAndRewrite1ToN field held an indeterminate pointer. The driver's null check then read garbage and jumped into it, segfaulting mlir/test/python/rewrite.py. Value-initialize the struct so optional callbacks default to null. https://invent.kde.org/qt/clang/llvm/-/commit/31317487652aa73b63b8bfa7f37fb23b3e17dfec Git commit 1ddc2632b9cef9589ca9fd91492e5081ebcf6813 by makslevental on 21/07/2026 at 21:29.. pre-increment https://invent.kde.org/qt/clang/llvm/-/commit/1ddc2632b9cef9589ca9fd91492e5081ebcf6813 Git commit 6435150813326d2944990fd8d0e702fa8c22588a by makslevental on 21/07/2026 at 21:29.. cleanup comments https://invent.kde.org/qt/clang/llvm/-/commit/6435150813326d2944990fd8d0e702fa8c22588a Git commit 66915160f8e134c66f8fa95854c05d9607b96ece by makslevental on 21/07/2026 at 21:29.. [mlir-c] Test the failure path of the 1:N type conversion callback Adds a test that registers a 1:N conversion function returning MlirTypeConverterConversionStatusFailure. Because it is tried before the i32 -> (i16, i16) conversion, the failure must abort the whole conversion (rather than falling back), leaving the IR unchanged -- the behavior that a plain decline would not produce. https://invent.kde.org/qt/clang/llvm/-/commit/66915160f8e134c66f8fa95854c05d9607b96ece