[llvm] 2a49d65 - [docs][LoopTerminology] Add Loop Simplify Form description.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 18:43:03 PST 2020


Author: Stefanos Baziotis
Date: 2020-02-26T20:41:06-06:00
New Revision: 2a49d650a5d208f92b0afbfa1e59a58496abe03d

URL: https://github.com/llvm/llvm-project/commit/2a49d650a5d208f92b0afbfa1e59a58496abe03d
DIFF: https://github.com/llvm/llvm-project/commit/2a49d650a5d208f92b0afbfa1e59a58496abe03d.diff

LOG: [docs][LoopTerminology] Add Loop Simplify Form description.

Information taken from https://youtu.be/3pRhvQi7Z10?t=481 and
comments in LoopSimplify.h.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D74989

Added: 
    

Modified: 
    llvm/docs/LoopTerminology.rst
    llvm/docs/Passes.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/LoopTerminology.rst b/llvm/docs/LoopTerminology.rst
index e33a019da3c6..61f9629118d3 100644
--- a/llvm/docs/LoopTerminology.rst
+++ b/llvm/docs/LoopTerminology.rst
@@ -141,10 +141,25 @@ are important for working successfully with this interface.
   reachability of the loop.
   
 
+.. _loop-terminology-loop-simplify:
+
 Loop Simplify Form
 ==================
 
-TBD
+The Loop Simplify Form is a canonical form that makes
+several analyses and transformations simpler and more effective.
+It is ensured by the LoopSimplify
+(:ref:`-loop-simplify <passes-loop-simplify>`) pass and is automatically
+added by the pass managers when scheduling a LoopPass.
+This pass is implemented in
+`LoopInfo.h <http://llvm.org/doxygen/LoopSimplify_8h_source.html>`_.
+When it is successful, the loop has:
+
+* A preheader.
+* A single backedge (which implies that there is a single latch).
+* Dedicated exits. That is, no exit block for the loop
+  has a predecessor that is outside the loop. This implies
+  that all exit blocks are dominated by the loop header.
 
 
 Loop Closed SSA (LCSSA)

diff  --git a/llvm/docs/Passes.rst b/llvm/docs/Passes.rst
index 7a90d189c991..a13f1e6694ca 100644
--- a/llvm/docs/Passes.rst
+++ b/llvm/docs/Passes.rst
@@ -803,12 +803,15 @@ loop to increment the value by the appropriate amount.
 
 A simple loop rotation transformation.
 
+.. _passes-loop-simplify:
+
 ``-loop-simplify``: Canonicalize natural loops
 ----------------------------------------------
 
 This pass performs several transformations to transform natural loops into a
 simpler form, which makes subsequent analyses and transformations simpler and
-more effective.
+more effective. A summary of it can be found in
+:ref:`Loop Terminology, Loop Simplify Form <loop-terminology-loop-simplify>`.
 
 Loop pre-header insertion guarantees that there is a single, non-critical entry
 edge from outside of the loop to the loop header.  This simplifies a number of


        


More information about the llvm-commits mailing list