Richard Biener <richard.guent...@gmail.com> writes: > [...] > I wonder if you can amend doc/passes.texi, specifically noting differences > between fwprop, combine and late-combine?
Ooh, we have a doc/passes.texi? :) Somehow missed that. How about the patch below? Thanks, Richard diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi index 5746d3ec636..4ac7a2306a1 100644 --- a/gcc/doc/passes.texi +++ b/gcc/doc/passes.texi @@ -991,6 +991,25 @@ RTL expressions for the instructions by substitution, simplifies the result using algebra, and then attempts to match the result against the machine description. The code is located in @file{combine.cc}. +@item Late instruction combination + +This pass attempts to do further instruction combination, on top of +that performed by @file{combine.cc}. Its current purpose is to +substitute definitions into all uses simultaneously, so that the +definition can be removed. This differs from the forward propagation +pass, whose purpose is instead to simplify individual uses on the +assumption that the definition will remain. It differs from +@file{combine.cc} in that there is no hard-coded limit on the number +of instructions that can be combined at once. It also differs from +@file{combine.cc} in that it can move instructions, where necessary. + +However, the pass is not in principle limited to this form of +combination. It is intended to be a home for other, future +combination approaches as well. + +The pass runs twice, once before register allocation and once after +register allocation. The code is located in @file{late-combine.cc}. + @item Mode switching optimization This pass looks for instructions that require the processor to be in a