[flang-commits] [flang] [Flang][OpenMP] Add Semantics support for Nested OpenMPLoopConstructs (PR #145917)

Jack Styles via flang-commits flang-commits at lists.llvm.org
Fri Jun 27 02:47:13 PDT 2025


Stylie777 wrote:

@jsjodin Regarding your comment. This is not something I had considered. I could look at adding a check here? If we have an `unroll` followed by a `tile` there may be enough information available to give an error as both OpenMPLoopConstruct's will be in scope for that function call when processing the `tile`. The only question would be around if it can be determined whether the `unroll` is full or partial. If this is not the case, then it cannot be dealt with at the `canonicalise-omp` stage. I think this is possible but I will need to investigate this.

With the second example you have given, I am not sure if this can be dealt with here and that might require a new pass to check this. I will take a look and see whats possible in the scope `canonicalise-omp` has, but it may be too limiting.

I suspect the first point is possible, the second may need some level of processing in the lowering.

Admittedly my experience with Flang is limited, having only begun working on this part of the LLVM Project 4 weeks ago, so if others have other ideas please bring them forward.

https://github.com/llvm/llvm-project/pull/145917


More information about the flang-commits mailing list