[all-commits] [llvm/llvm-project] 099ecd: [mlir][OpenMP] map argument to reduction initializ...
Tom Eccles via All-commits
all-commits at lists.llvm.org
Thu Apr 4 02:56:05 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 099ecdf1ec2f87b5bae74518166daf1d2b09da45
https://github.com/llvm/llvm-project/commit/099ecdf1ec2f87b5bae74518166daf1d2b09da45
Author: Tom Eccles <tom.eccles at arm.com>
Date: 2024-04-04 (Thu, 04 Apr 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 (#86979)
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.
This argument was never used previously because for most cases the
initialized value depends only upon the type of the reduction, not on
the original variable. It is needed now so that we can read the array
extents for the local copy from the mold.
Flang support for reductions on assumed shape arrays patch 2/3
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