[all-commits] [llvm/llvm-project] b487f9: [Flang] Implement !$omp unroll using omp.unroll_he...

Michael Kruse via All-commits all-commits at lists.llvm.org
Tue Jul 22 02:39:22 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b487f9a7bd15e453a3ff7fcbfbc54e54eecf26d3
      https://github.com/llvm/llvm-project/commit/b487f9a7bd15e453a3ff7fcbfbc54e54eecf26d3
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2025-07-22 (Tue, 22 Jul 2025)

  Changed paths:
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    M flang/test/Lower/OpenMP/nested-loop-transformation-construct01.f90
    M flang/test/Lower/OpenMP/nested-loop-transformation-construct02.f90
    A flang/test/Lower/OpenMP/unroll-heuristic01.f90
    A flang/test/Lower/OpenMP/unroll-heuristic02.f90
    A flang/test/Parser/OpenMP/unroll-heuristic.f90
    A flang/test/Parser/OpenMP/unroll-partial.f90
    R flang/test/Parser/OpenMP/unroll.f90

  Log Message:
  -----------
  [Flang] Implement !$omp unroll using omp.unroll_heuristic (#144785)

Add support for `!$omp unroll` in Flang and basic MLIR
`omp.canonical_loop` modeling.

First step to add `omp.canonical_loop` modeling to the MLIR OpenMP
dialect with the goal of being more general than the current
`omp.loop_nest` approach:
 * Support for non-perfectly nested loops
 * Support for non-rectangular loops
 * Support for arbitrary compositions of loop transformations

This patch is functional end-to-end and adds support for `!$omp unroll`
to Flang. `!$omp unroll` is lowered to `omp.new_cli`,
`omp.canonical_loop`, and `omp.unroll_heuristic` in MLIR, which are
lowered to LLVM-IR using the OpenMPIRBuilder
(https://reviews.llvm.org/D107764).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list