[all-commits] [llvm/llvm-project] c83bdc: [MLIR][OpenMP] Normalize lowering of omp.loop_nest...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Mon Feb 24 05:38:51 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c83bdc7c111f8100d8fdf9e7a87d05b5a1a3ae94
https://github.com/llvm/llvm-project/commit/c83bdc7c111f8100d8fdf9e7a87d05b5a1a3ae94
Author: Sergio Afonso <safonsof at amd.com>
Date: 2025-02-24 (Mon, 24 Feb 2025)
Changed paths:
M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
M mlir/test/Target/LLVMIR/openmp-llvm.mlir
M mlir/test/Target/LLVMIR/openmp-simd-private.mlir
Log Message:
-----------
[MLIR][OpenMP] Normalize lowering of omp.loop_nest (#127217)
This patch refactors the translation of `omp.loop_nest` operations into
LLVM IR so that it is handled similarly to other operations. Before this
change, the responsibility of translating the loop nest fell into each
loop wrapper, causing code duplication. This patch centralizes that
handling of the loop. One consequence of this was fixing an issue
lowering non-inclusive `omp.simd` loops.
As a result, it is now expected that the handling of composite
constructs is performed collaboratively among translating functions for
each operation involved. At the moment, only `do/for simd` is supported
by ignoring SIMD information, and this behavior is preserved.
The translation of loop wrapper operations needs access to the
`llvm::CanonicalLoopInfo` loop information structure in order to apply
transformations to it. This is now created in the nested call to
`convertOmpLoopNest`, so it needs to be passed up to all associated loop
wrapper translation functions. This is done via the creation of an
`OpenMPLoopInfoStackFrame` within `convertHostOrTargetOperation`,
associated to the outermost loop wrapper. This structure is updated by
`convertOmpLoopNest`, making the result available to all loop wrappers
after their body has been translated.
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