[all-commits] [llvm/llvm-project] 6fb2f2: [Flang][OpenMP] Add lowering support for DO SIMD

Sergio Afonso via All-commits all-commits at lists.llvm.org
Tue Jul 9 02:34:35 PDT 2024


  Branch: refs/heads/users/skatrak/composite-lower-06-dosimd
  Home:   https://github.com/llvm/llvm-project
  Commit: 6fb2f2bfa68b49801fa3a23076915db721458cf2
      https://github.com/llvm/llvm-project/commit/6fb2f2bfa68b49801fa3a23076915db721458cf2
  Author: Sergio Afonso <safonsof at amd.com>
  Date:   2024-07-09 (Tue, 09 Jul 2024)

  Changed paths:
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    R flang/test/Lower/OpenMP/Todo/omp-do-simd-aligned.f90
    M flang/test/Lower/OpenMP/Todo/omp-do-simd-linear.f90
    R flang/test/Lower/OpenMP/Todo/omp-do-simd-safelen.f90
    R flang/test/Lower/OpenMP/Todo/omp-do-simd-simdlen.f90
    M flang/test/Lower/OpenMP/if-clause.f90
    M flang/test/Lower/OpenMP/loop-compound.f90
    A flang/test/Lower/OpenMP/wsloop-schedule.f90
    M flang/test/Lower/OpenMP/wsloop-simd.f90
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

  Log Message:
  -----------
  [Flang][OpenMP] Add lowering support for DO SIMD

This patch adds support for lowering 'DO SIMD' constructs to MLIR. SIMD
information is now stored in an `omp.simd` loop wrapper, which is currently
ignored by the OpenMP dialect to LLVM IR translation stage.

The end result is that runtime behavior of compiled 'DO SIMD' constructs does
not change after this patch, so 'DO SIMD' still runs like 'DO' (i.e. SIMD width
= 1). However, all of the required information is now present in the resulting
MLIR representation.

To avoid confusion, the previous wsloop-simd.f90 lit test is renamed to
wsloop-schedule.f90 and a new wsloop-simd.f90 test is created to check the
addition of SIMD clauses to the `omp.simd` operation produced when a 'DO SIMD'
construct is lowered to MLIR.



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