| commit | ce8032394fa4ff55c36d857e85241c1bd0cacc60 | [log] [tgz] |
|---|---|---|
| author | Dominik Adamski <dominik.adamski@amd.com> | Mon Jan 29 10:33:15 2024 +0100 |
| committer | GitHub <noreply@github.com> | Mon Jan 29 10:33:15 2024 +0100 |
| tree | 2ed2267dc19285826c188b9eb10af78b081a5e56 | |
| parent | 9f80ecb308c989523cc32d4256f7ab61c5b788d7 [diff] |
[Flang][OpenMP] Use simdloop operation only for omp simd pragma (#79559) OpenMP standard differentiates between omp simd (2.9.3.1) and omp do/for simd (2.9.3.2 for OpenMP 5.0 standard) pragmas. The first one describes the loop which needs to be vectorized. The second pragma describes the loop which needs to be workshared between existing threads. Each thread can use SIMD instructions to execute its chunk of the loop. That's why we need to model ``` !$omp simd do-loop ``` as `omp.simdloop` operation and add compiler hints for vectorization. The worksharing loop: !$omp do simd do-loop should be represented as worksharing loop (`omp.wsloop`). Currently Flang denotes both types of OpenMP pragmas by `omp.simdloop` operation. In consequence we cannot differentiate between: ``` !$omp parallel simd do-loop ``` and ``` !$omp parallel do simd do-loop ``` The second loop should be workshared between multiple threads. The first one describes the loop which needs to be redundantly executed by multiple threads. Current Flang implementation does not perform worksharing for `!$omp do simd` pragma and generates valid code only for the first case.
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.