[flang-commits] [flang] [llvm] [mlir] [flang][OpenMP] Support the FULL clause on the UNROLL construct (PR #214115)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon Aug 10 03:44:18 PDT 2026
================
@@ -557,6 +557,36 @@ def UnrollHeuristicOp : OpenMPTransform_Op<"unroll_heuristic", []> {
let hasCustomAssemblyFormat = 1;
}
+//===----------------------------------------------------------------------===//
+// OpenMP unroll_full operation
+//===----------------------------------------------------------------------===//
+
+def UnrollFullOp : OpenMPTransform_Op<"unroll_full", []> {
----------------
tblah wrote:
Sorry for the delay. I decided that I didn't think it was worth it to implement a cleverer verifier which can fold all of these constant generating operations because the built in MLIR folding machinery will mutate the IR (not allowed in a verifier) and reproducing it would be an unreasonable amount of complexity to maintain.
That left two options: fold in flang (and require future frontends to do the same) or continue with untranslatable IR. I went with the first because it is not difficult in the front end and it makes it easier to detect lowering bugs.
Flang folding is added here: https://github.com/llvm/llvm-project/pull/215238
https://github.com/llvm/llvm-project/pull/214115
More information about the flang-commits
mailing list