brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.2 KiB · 97ded91 Raw
158 lines · plain
1.. title:: Welcome to the documentation of OpenMP in LLVM!2 3.. note::4   This document is a work in progress and most of the expected content is not5   yet available. While you can expect changes, we always welcome feedback and6   additions. Please post on the `Discourse forums (Runtimes - 7   OpenMP) <https://discourse.llvm.org/c/runtimes/openmp/35>`__..8 9.. toctree::10   :hidden:11   :maxdepth: 112 13   LLVM/OpenMP Documentation <self>14 15 16Building LLVM/OpenMP Offloading17===============================18 19Building LLVM/OpenMP with offloading support is fully documented in the20:doc:`Support and FAQ <SupportAndFAQ>` page. For a quick start, we recommend21the following template.22 23.. code-block:: sh24 25  $> cd llvm-project  # The llvm-project checkout26  $> mkdir build27  $> cd build28  $> cmake ../llvm -G Ninja                                                 \29     -C ../offload/cmake/caches/Offload.cmake \ # The preset cache file30     -DCMAKE_BUILD_TYPE=<Debug|Release>   \ # Select build type31     -DCMAKE_INSTALL_PREFIX=<PATH>        \ # Where the libraries will live32  $> ninja install33 34LLVM/OpenMP Design & Overview35=============================36 37OpenMP impacts various parts of the LLVM project, from the frontends (`Clang38<https://clang.llvm.org/docs/OpenMPSupport.html>`_ and Flang), through39middle-end :ref:`optimizations <llvm_openmp_optimizations>`, up to the40multitude of available :ref:`OpenMP runtimes <openmp_runtimes>`.41 42A high-level overview of OpenMP in LLVM can be found :doc:`here <design/Overview>`.43 44.. toctree::45   :hidden:46   :maxdepth: 147 48   design/Overview49 50OpenACC Support51===============52 53:doc:`OpenACC support <openacc/Overview>` is under development for54both Flang and Clang.  For this purpose, LLVM's OpenMP runtimes are55being extended to serve as OpenACC runtimes.  In some cases, Clang56supports :doc:`OpenMP extensions <openacc/OpenMPExtensions>` to make57the additional functionality also available in OpenMP applications.58 59.. toctree::60   :hidden:61   :maxdepth: 162 63   openacc/Overview64 65LLVM/OpenMP Optimizations66=========================67 68LLVM, since `version 11 <https://releases.llvm.org/download.html#11.0.0>`_ (12 Oct692020), has an :doc:`OpenMP-Aware optimization pass <optimizations/OpenMPOpt>`70as well as the ability to :doc:`perform "scalar optimizations" across OpenMP region71boundaries <optimizations/OpenMPUnawareOptimizations>`.72 73In-depth discussion of the topic can be found :doc:`here <optimizations/Overview>`.74 75.. toctree::76   :hidden:77   :maxdepth: 178 79   optimizations/Overview80 81LLVM/OpenMP Optimization Remarks82================================83 84LLVM has an elaborate ecosystem around `analysis and optimization remarks85<https://llvm.org/docs/Remarks.html>`_ issues during86compilation. The remarks can be enabled from the clang frontend `[1]`_ `[2]`_87in various formats `[3]`_ `[4]`_ to be used by tools, i.a., `opt-viewer` or88`llvm-opt-report` (dated).89 90The OpenMP optimizations in LLVM have been developed with remark support as a91priority. For a list of OpenMP specific remarks and more information on them,92please refer to :doc:`remarks/OptimizationRemarks`.93 94 95.. _`[1]`: https://clang.llvm.org/docs/UsersManual.html#options-to-emit-optimization-reports96.. _`[2]`: https://clang.llvm.org/docs/ClangCommandLineReference.html#diagnostic-flags97.. _`[3]`: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-foptimization-record-file98.. _`[4]`: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang1-fsave-optimization-record99 100+ `[1]`_ https://clang.llvm.org/docs/UsersManual.html#options-to-emit-optimization-reports101+ `[2]`_ https://clang.llvm.org/docs/ClangCommandLineReference.html#diagnostic-flags102+ `[3]`_ https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-foptimization-record-file103+ `[4]`_ https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang1-fsave-optimization-record104 105 106.. toctree::107   :hidden:108   :maxdepth: 1109 110   remarks/OptimizationRemarks111 112OpenMP Command-Line Argument Reference113======================================114In addition to the 115`Clang command-line argument reference <https://clang.llvm.org/docs/ClangCommandLineReference.html>`_ 116we also recommend the OpenMP 117:doc:`command-line argument reference <CommandLineArgumentReference>` 118page that offers a detailed overview of options specific to OpenMP. It also 119contains a list of OpenMP offloading related command-line arguments.120 121 122.. toctree::123   :hidden:124   :maxdepth: 1125 126   CommandLineArgumentReference127 128Support, Getting Involved, and Frequently Asked Questions (FAQ)129===============================================================130 131Dealing with OpenMP can be complicated. For help with the setup of an OpenMP132(offload) capable compiler toolchain, its usage, and common problems, consult133the :doc:`Support and FAQ <SupportAndFAQ>` page.134 135We also encourage everyone interested in OpenMP in LLVM to :doc:`get involved136<SupportAndFAQ>`.137 138 139.. toctree::140   :hidden:141   :maxdepth: 1142 143   SupportAndFAQ144 145Release Notes146=============147 148The current (in-progress) release notes can be found :doc:`here <ReleaseNotes>` while149release notes for releases, starting with LLVM 12, will be available on `the150Download Page <https://releases.llvm.org/download.html>`_.151 152 153.. toctree::154   :hidden:155   :maxdepth: 1156 157   In-Progress ReleaseNotes <ReleaseNotes>158