summaryrefslogtreecommitdiff
path: root/gcc/doc/passes.texi
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/doc/passes.texi')
-rw-r--r--gcc/doc/passes.texi17
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi
index 94b9ae5b23a..9867e7323ef 100644
--- a/gcc/doc/passes.texi
+++ b/gcc/doc/passes.texi
@@ -363,9 +363,20 @@ and is described by @code{pass_pre}.
@item Loop optimization
-TODO: Presumably we're going to do something with loops here. At
-present we don't, and this is a placeholder. The pass is located
-in @file{tree-ssa-loop.c} and is described by @code{pass_loop}.
+The main driver of the pass is placed in @file{tree-ssa-loop.c}
+and described by @code{pass_loop}.
+
+The optimizations performed by this pass are:
+
+Loop invariant motion. This pass moves only invariants that
+would be hard to handle on rtl level (function calls, operations that expand to
+nontrivial sequences of insns). With @option{-funswitch-loops} it also moves
+operands of conditions that are invariant out of the loop, so that we can use
+just trivial invariantness analysis in loop unswitching. The pass also includes
+store motion. The pass is implemented in @file{tree-ssa-loop-im.c}.
+
+The optimizations also use various utility functions contained in
+@file{cfgloop.c}, @file{cfgloopanal.c} and @file{cfgloopmanip.c}.
@item Conditional constant propagation