[all-commits] [llvm/llvm-project] aa5f84: [mlir][OpenMP] map argument to reduction initializ...

Tom Eccles via All-commits all-commits at lists.llvm.org
Thu Mar 28 10:02:37 PDT 2024


  Branch: refs/heads/users/tblah/omp_assumed_shape_reduction_2
  Home:   https://github.com/llvm/llvm-project
  Commit: aa5f843292a941dc976bd445d1dce4916cfb7438
      https://github.com/llvm/llvm-project/commit/aa5f843292a941dc976bd445d1dce4916cfb7438
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2024-03-28 (Thu, 28 Mar 2024)

  Changed paths:
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    A mlir/test/Target/LLVMIR/openmp-reduction-init-arg.mlir

  Log Message:
  -----------
  [mlir][OpenMP] map argument to reduction initialization region

The argument to the initialization region of reduction declarations was
never mapped. This meant that if this argument was accessed inside the
initialization region, that mlir operation would be translated to an
llvm operation with a null argument (failing verification).

Adding the mapping ensures that the right LLVM value can be found when
inlining and converting the initialization region.

We have to separately establish and clean up these mappings for each use
of the reduction declaration because repeated usage of the same
declaration will inline it using a different concrete value for the
block argument.



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