538 changes: 538 additions & 0 deletions openmp/docs/_themes/llvm-openmp-theme/static/agogo.css_t

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions openmp/docs/_themes/llvm-openmp-theme/theme.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[theme]
inherit = basic
stylesheet = agogo.css
pygments_style = tango

[options]
bodyfont = "Verdana", Arial, sans-serif
headerfont = "Georgia", "Times New Roman", serif
pagewidth = 70em
documentwidth = 50em
rightsidebar = true
sidebarwidth = 20em
bgcolor = #eeeeec
headerbg = #555573 url(bgtop.png) top left repeat-x
footerbg = url(bgfooter.png) top left repeat-x
linkcolor = #ce5c00
headercolor1 = #204a87
headercolor2 = #3465a4
headerlinkcolor = #fcaf3e
textalign = justify
14 changes: 7 additions & 7 deletions openmp/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
master_doc = 'index'

# General information about the project.
project = u'LLVM OpenMP'
copyright = u'2013-%d, LLVM OpenMP' % date.today().year
project = u'LLVM/OpenMP'
copyright = u'2013-%d, LLVM/OpenMP' % date.today().year

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -94,7 +94,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'llvm-theme'
html_theme = 'llvm-openmp-theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -189,8 +189,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'OpenMP.tex', u'LLVM OpenMP Documentation',
u'LLVM OpenMP', 'manual'),
('index', 'OpenMP.tex', u'LLVM/OpenMP Documentation',
u'LLVM/OpenMP', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -230,8 +230,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'LLVM OpenMP', u'LLVM OpenMP Documentation',
u'LLVM OpenMP', 'LLVM OpenMP', 'One line description of project.',
('index', 'LLVM/OpenMP', u'LLVM/OpenMP Documentation',
u'LLVM/OpenMP', 'LLVM/OpenMP', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
2 changes: 2 additions & 0 deletions openmp/docs/design/GPUGenericMode.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OpenMP Target Offloading --- Generic Mode
=========================================
2 changes: 2 additions & 0 deletions openmp/docs/design/GPUSPMDMode.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OpenMP Target Offloading --- SPMD Mode
======================================
11 changes: 11 additions & 0 deletions openmp/docs/design/Offloading.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
OpenMP in LLVM --- Offloading Design
====================================

.. toctree::
:glob:
:hidden:
:maxdepth: 1

GPUSPMDMode
GPUGenericMode

13 changes: 13 additions & 0 deletions openmp/docs/design/Overview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
OpenMP in LLVM --- Design Overview
==================================



.. toctree::
:glob:
:hidden:
:maxdepth: 1

Runtimes
Offloading

24 changes: 24 additions & 0 deletions openmp/docs/design/Runtimes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. _openmp_runtimes:

LLVM/OpenMP Runtimes
====================

There are four distinct types of LLVM/OpenMP runtimes

LLVM/OpenMP Host Runtime (``libomp``)
-------------------------------------

An `early (2015) design document <https://openmp.llvm.org/Reference.pdf>`_ for
the LLVM/OpenMP host runtime, aka. `libomp.so`, is available as a `pdf
<https://openmp.llvm.org/Reference.pdf>`_.


LLVM/OpenMP Target Host Runtime (``libomptarget``)
--------------------------------------------------

LLVM/OpenMP Target Host Runtime Plugins (``libomptarget.rtl.XXXX``)
-------------------------------------------------------------------

LLVM/OpenMP Target Device Runtime (``libomptarget-ARCH-SUBARCH.bc``)
--------------------------------------------------------------------

105 changes: 93 additions & 12 deletions openmp/docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,106 @@
About
=====
.. title:: Welcome to the documentation of OpenMP in LLVM!

Support for the OpenMP parallel programming API in the LLVM compiler
infrastructure. Here you will find helpful links to OpenMP library documentation
and other resources.
.. note::
This document is a work in progress and most of the expected content is not
yet available. While you can expect changes, we always welcome feedback and
additions. Please contact, e.g., through ``openmp-dev@lists.llvm.org``.

LLVM OpenMP Design & Overview
.. toctree::
:hidden:
:maxdepth: 1

LLVM/OpenMP Documentation <self>


LLVM/OpenMP Design & Overview
=============================

This describes the design of the `LLVM OpenMP Runtime Library`_
OpenMP impacts various parts of the LLVM project, from the frontends (`Clang
<https://clang.llvm.org/docs/OpenMPSupport.html>`_ and Flang), through
middle-end :ref:`optimizations <llvm_openmp_optimizations>`, up to the
multitude of available :ref:`OpenMP runtimes <openmp_runtimes>`.

A high-level overview of OpenMP in LLVM can be found :doc:`here <design/Overview>`.

.. toctree::
:hidden:
:maxdepth: 1

design/Overview


LLVM/OpenMP Optimizations
=========================

LLVM, since `version 11 <https://releases.llvm.org/download.html#11.0.0>`_ (12 Oct
2020), has an :doc:`OpenMP-Aware optimization pass <optimizations/OpenMPOpt>`
as well as the ability to :doc:`perform "scalar optimizations" across OpenMP region
boundaries <optimizations/OpenMPUnawareOptimizations>`.

In-depth discussion of the topic can be found :doc:`here <optimizations/Overview>`.

.. toctree::
:hidden:
:maxdepth: 1

optimizations/Overview

LLVM/OpenMP Optimization Remarks
================================

.. _`LLVM OpenMP Runtime Library`: https://openmp.llvm.org/Reference.pdf
LLVM has an elaborate ecosystem around `analysis and optimization remarks
<https://llvm.org/docs/Remarks.html>`_ issues during
compilation. The remarks can be enabled from the clang frontend `[1]`_ `[2]`_
in various formats `[3]`_ `[4]`_ to be used by tools, i.a., `opt-viewer` or
`llvm-opt-report` (dated).

The OpenMP optimizations in LLVM have been developed with remark support as a
priority. For a list of OpenMP specific remarks and more information on them,
please refer to :doc:`remarks/OptimizationRemarks`.


.. _`[1]`: https://clang.llvm.org/docs/UsersManual.html#options-to-emit-optimization-reports
.. _`[2]`: https://clang.llvm.org/docs/ClangCommandLineReference.html#diagnostic-flags
.. _`[3]`: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-foptimization-record-file
.. _`[4]`: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang1-fsave-optimization-record

+ `[1]`_ https://clang.llvm.org/docs/UsersManual.html#options-to-emit-optimization-reports
+ `[2]`_ https://clang.llvm.org/docs/ClangCommandLineReference.html#diagnostic-flags
+ `[3]`_ https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-foptimization-record-file
+ `[4]`_ https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang1-fsave-optimization-record


.. toctree::
:hidden:
:maxdepth: 1

remarks/OptimizationRemarks


Support & Frequently Asked Questions (FAQ)
==========================================

Dealing with OpenMP can be complicated. For help with the setup of an OpenMP
(offload) capable compiler toolchain, its usage, and common problems, consult
the :doc:`Support and FAQ <SupportAndFAQ>` page.


.. toctree::
:hidden:
:maxdepth: 1

SupportAndFAQ

Release Notes
=============

Current OpenMP release notes.
The current (in-progress) release notes can be found :doc:`here <ReleaseNotes>` while
release notes for releases, starting with LLVM 12, will be available on `the
Download Page <https://releases.llvm.org/download.html>`_.


.. toctree::
:hidden:
:maxdepth: 1

ReleaseNotes

* :doc:`ReleaseNotes`
In-Progress ReleaseNotes <ReleaseNotes>
5 changes: 5 additions & 0 deletions openmp/docs/optimizations/OpenMPOpt.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OpenMP-Aware Optimizations
==========================

OpenMPOpt
---------
2 changes: 2 additions & 0 deletions openmp/docs/optimizations/OpenMPUnawareOptimizations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OpenMP-Unaware Optimizations
============================
19 changes: 19 additions & 0 deletions openmp/docs/optimizations/Overview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. _llvm_openmp_optimizations:

OpenMP Optimizations in LLVM
============================

LLVM, since `version 11 <https://releases.llvm.org/download.html#11.0.0>`_ (12 Oct
2020), has an :doc:`OpenMP-Aware optimization pass <OpenMPOpt>`
as well as the ability to :doc:`perform "scalar optimizations" across OpenMP region
boundaries <OpenMPUnawareOptimizations>`.

.. toctree::
:glob:
:hidden:
:titlesonly:
:maxdepth: 1

OpenMPOpt
OpenMPUnawareOptimizations

2 changes: 2 additions & 0 deletions openmp/docs/remarks/OptimizationRemarks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OpenMP Optimization Remarks
===========================