[flang] [llvm] [mlir] [flang][OpenMP] Enable tiling (PR #143715)
Jack Styles via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 26 03:56:42 PDT 2025
================
@@ -5024,8 +5024,9 @@ struct OpenMPBlockConstruct {
struct OpenMPLoopConstruct {
TUPLE_CLASS_BOILERPLATE(OpenMPLoopConstruct);
OpenMPLoopConstruct(OmpBeginLoopDirective &&a)
- : t({std::move(a), std::nullopt, std::nullopt}) {}
+ : t({std::move(a), std::nullopt, std::nullopt, std::nullopt}) {}
std::tuple<OmpBeginLoopDirective, std::optional<DoConstruct>,
+ std::optional<common::Indirection<OpenMPLoopConstruct>>,
----------------
Stylie777 wrote:
> Allowing multiple nested ops would be the final step, at that point we would need to use the CLIs, canonical loops and loop transformation ops.
As part of my work for #110008 I have implemented nested ops for `tile` and `unroll` in the semantics checks (PR coming soon, just doing finishing touches). It does work slightly differently in that `std::optional<DoConstruct>` has become `std::optional<std::variant<DoConstruct, common::Indirection<OpenMPLoopConstruct>>>` in the Parse Tree.
This approach stores either one or the other, and then Flang can determine which is being used. I personally think this is a better approach as then you are not opening the possibility for there being a `DoConstruct` and `OpenMPLoopConstruct`. It works in a similar way where it will link together the LoopConstructs until you reach a DoConstruct.
Its currently a standalone change, as this is not merged yet, but it would be good to agree on an approach so there is minimal changes made when one of these is merged.
https://github.com/llvm/llvm-project/pull/143715
More information about the llvm-commits
mailing list