summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAshutosh Nema <ashu1212@gmail.com>2016-02-06 07:47:48 +0000
committerAshutosh Nema <ashu1212@gmail.com>2016-02-06 07:47:48 +0000
commit9feccf470d5f213dc9730dbe14c667914e105fc5 (patch)
treee05d7cfd0617d1e981801700a6a5cb40ffbf1c89 /docs
parente56d199eb3bc85d981de5fab1fb82e0ad502575b (diff)
New Loop Versioning LICM Pass
Summary: When alias analysis is uncertain about the aliasing between any two accesses, it will return MayAlias. This uncertainty from alias analysis restricts LICM from proceeding further. In cases where alias analysis is uncertain we might use loop versioning as an alternative. Loop Versioning will create a version of the loop with aggressive aliasing assumptions in addition to the original with conservative (default) aliasing assumptions. The version of the loop making aggressive aliasing assumptions will have all the memory accesses marked as no-alias. These two versions of loop will be preceded by a memory runtime check. This runtime check consists of bound checks for all unique memory accessed in loop, and it ensures the lack of memory aliasing. The result of the runtime check determines which of the loop versions is executed: If the runtime check detects any memory aliasing, then the original loop is executed. Otherwise, the version with aggressive aliasing assumptions is used. The pass is off by default and can be enabled with command line option -enable-loop-versioning-licm. Reviewers: hfinkel, anemet, chatur01, reames Subscribers: MatzeB, grosser, joker.eph, sanjoy, javed.absar, sbaranga, llvm-commits Differential Revision: http://reviews.llvm.org/D9151 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index 1932cb6d843..5f745d2b06f 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -4554,6 +4554,17 @@ For example:
!0 = !{!"llvm.loop.unroll.full"}
+'``llvm.loop.licm_versioning.disable``' Metadata
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This metadata indicates that the loop should not be versioned for the purpose
+of enabling loop-invariant code motion (LICM). The metadata has a single operand
+which is the string ``llvm.loop.licm_versioning.disable``. For example:
+
+.. code-block:: llvm
+
+ !0 = !{!"llvm.loop.licm_versioning.disable"}
+
'``llvm.mem``'
^^^^^^^^^^^^^^^