[flang-commits] [flang] [flang] Implement !DIR$ UNROLL_AND_JAM [N] (PR #125046)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Mon Feb 3 05:21:02 PST 2025


================
@@ -39,6 +39,12 @@ A list of non-standard directives supported by Flang
 * `!dir$ vector always` forces vectorization on the following loop regardless
   of cost model decisions. The loop must still be vectorizable.
   [This directive currently only works on plain do loops without labels].
+* `!dir$ unroll [N]` control how many times a loop should be unrolled. It must
+  be placed immediately before a loop. `N` is an integer that specifying the 
+  unrolling factor.
+* `!dir$ unroll_and_jam [N]` control how many times a loop should be unrolled and
+  jammed. It must be placed immediately before a loop that follows. `N` is an 
+  integer that specifying the unrolling factor.
----------------
kiranchandramohan wrote:

Can you also say whether `N` is optional or not? And if it is optional what happens?

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


More information about the flang-commits mailing list