[qt/clang/llvm]: Summary of bulk changes made
KDE Git Services - Bulk Change <[email protected]> Wed, 5 Aug 2026 12:12:21 +0000 (UTC)
| 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/skatrak/omp-func-filter-03-declare-target'. Changed from 0000000000000000000000000000000000000000 to f1a52c01a4b602e42204fb1e5683a6492f62fd7d 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 bf7b2c660260b2d77430051ad9b35681a35d05b0 by Sergio Afonso on 05/08/2026 at 10:21.. [Flang][MLIR][OpenMP] Move function filtering to the omp dialect The `FunctionFilteringPass`, which removes host-only functions when compiling for an OpenMP target device, is currently defined only for Flang. However, it implements logic that would generally be useful for other frontends that can generate OpenMP offloading code. This patch makes that transition by implementing the following changes: - It rewrites the `FunctionFilteringPass` to work on lower level non-FIR MLIR modules. - It splits off preexisting logic to check for not-yet-implemented target device features during function filtering to its own pass and it improves context detection to properly diagnostic only device code. - It delays function filtering to run at the end of the pipeline, as well as the `MarkDeclareTargetPass`. This will enable the latter to run only once in the pipeline after the `UnimplementedDeviceCheckPass` becomes no longer necessary. One side effect of these changes is that delaying the filtering will cause all following passes to process host functions that are eventually deleted. On the other hand, it minimizes divergence between host and device MLIR modules making passes such as the `DeleteUnreachableTargets` no longer necessary, as well as allowing passes to introduce new host functions without causing problems on the device. https://invent.kde.org/qt/clang/llvm/-/commit/bf7b2c660260b2d77430051ad9b35681a35d05b0 Git commit f03725767c7cbacdb1e2d07308a193e55c363924 by Sergio Afonso on 05/08/2026 at 10:23.. [Flang][OpenMP] Remove the DeleteUnreachableTargets pass The `DeleteUnreachableTargets` pass was initially added to work around a problem caused by the interaction between the function filtering and host op filtering passes and generic MLIR optimizations. Specifically, by running function and host op filtering before these optimizations, we would lose the ability to detect unreachable `omp.target` operations when compiling for the device. This would cause GPU kernels being created for them, for which no host counterpart existed. By now having moved both passes towards the end of the compilation pipeline, after FIR to LLVM lowering, removal of unreachable host and device code is no longer impacted by them. This makes the `DeleteUnreachableTargets` pass redundant. https://invent.kde.org/qt/clang/llvm/-/commit/f03725767c7cbacdb1e2d07308a193e55c363924 Git commit ecb488cc91fbab7df281347f2c37c2aa887a1f34 by Sergio Afonso on 05/08/2026 at 10:24.. [Flang][OpenMP] Improve implicit declare_target propagation After starting to run the `MarkDeclareTarget` pass later in the pipeline, some limitations of its original implementation started to be hit; specifically, some calls being missed could result in an overly restrictive marking that would cause the `HostOpFiltering` pass to remove reachable device code. This patch aims to address these problems by making the following changes: - It makes sure to mark functions in every `RecipeInterface` op pointed to by OpenMP operations. - It recursively propagates and combines declare_target information from target regions and explicitly set declare_target functions to unmarked functions, but it never modifies explicitly marked functions. - External and public functions can now only be marked with `device_type(any)`. Before, marking them as `nohost` or `host` was possible, but without the ability to see all users we can't give such guarantees. - There was a bug in the handling of declare_target on interface subprograms that improvements to the pass made visible. Instead of adding the attribute to the MLIR function associated to the interface subprogram, it wasn't added at all, making it susceptible to being modified by the pass according to uses. This is fixed. Fixes #213367. https://invent.kde.org/qt/clang/llvm/-/commit/ecb488cc91fbab7df281347f2c37c2aa887a1f34 Git commit f1a52c01a4b602e42204fb1e5683a6492f62fd7d by Sergio Afonso on 05/08/2026 at 11:06.. update cir test https://invent.kde.org/qt/clang/llvm/-/commit/f1a52c01a4b602e42204fb1e5683a6492f62fd7d