| commit | c83bdc7c111f8100d8fdf9e7a87d05b5a1a3ae94 | [log] [tgz] |
|---|---|---|
| author | Sergio Afonso <safonsof@amd.com> | Mon Feb 24 13:38:27 2025 +0000 |
| committer | GitHub <noreply@github.com> | Mon Feb 24 13:38:27 2025 +0000 |
| tree | feb88c9ef6ad19635fa6fc9a9aca07dcf4b114b2 | |
| parent | 72768d9bb8ad3e97a852270726f04d7167d9ef50 [diff] |
[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.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.