diff options
author | Tim Corringham <tcorring@amd.com> | 2019-08-08 13:46:17 +0000 |
---|---|---|
committer | Tim Corringham <tcorring@amd.com> | 2019-08-08 13:46:17 +0000 |
commit | 4f64f1ba3c540cddbcf3f7f5e5b8a2fd9ebbb416 (patch) | |
tree | 69bb4c8a06f78dafb8905900509c5f5ba51eebe5 /llvm/docs | |
parent | 195ae90307bdbfcb7393da5dfbbb2bb38ff24107 (diff) | |
download | bcm5719-llvm-4f64f1ba3c540cddbcf3f7f5e5b8a2fd9ebbb416.tar.gz bcm5719-llvm-4f64f1ba3c540cddbcf3f7f5e5b8a2fd9ebbb416.zip |
Add llvm.licm.disable metadata
For some targets the LICM pass can result in sub-optimal code in some
cases where it would be better not to run the pass, but it isn't
always possible to suppress the transformations heuristically.
Where the front-end has insight into such cases it is beneficial
to attach loop metadata to disable the pass - this change adds the
llvm.licm.disable metadata to enable that.
Differential Revision: https://reviews.llvm.org/D64557
llvm-svn: 368296
Diffstat (limited to 'llvm/docs')
-rw-r--r-- | llvm/docs/LangRef.rst | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index b6979e5fc2e..a169589117c 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -5381,7 +5381,7 @@ suggests an unroll factor to the loop unroller: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This metadata disables all optional loop transformations unless -explicitly instructed using other transformation metdata such as +explicitly instructed using other transformation metadata such as ``llvm.loop.unroll.enable``. That is, no heuristic will try to determine whether a transformation is profitable. The purpose is to avoid that the loop is transformed to a different loop before an explicitly requested @@ -5720,10 +5720,24 @@ the non-distributed fallback version will have. See '``llvm.loop.distribute.followup_all``' Metadata ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Thes attributes in this metdata is added to all followup loops of the +The attributes in this metadata is added to all followup loops of the loop distribution pass. See :ref:`Transformation Metadata <transformation-metadata>` for details. +'``llvm.licm.disable``' Metadata +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This metadata indicates that loop-invariant code motion (LICM) should not be +performed on this loop. The metadata has a single operand which is the string +``llvm.licm.disable``. For example: + +.. code-block:: llvm + + !0 = !{!"llvm.licm.disable"} + +Note that although it operates per loop it isn't given the llvm.loop prefix +as it is not affected by the ``llvm.loop.disable_nonforced`` metadata. + '``llvm.access.group``' Metadata ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |