Index: docs/LanguageExtensions.rst =================================================================== --- docs/LanguageExtensions.rst +++ docs/LanguageExtensions.rst @@ -1991,10 +1991,12 @@ reduces the trip count. If ``unroll(full)`` is specified the unroller will attempt to fully unroll the -loop if the trip count is known at compile time. If the loop count is not known -or the fully unrolled code size is greater than the limit specified by the -`-pragma-unroll-threshold` command line option the loop will be partially -unrolled subject to the same limit. +loop if the trip count is known at compile time. If the fully unrolled code size +is greater than the limit specified by the `-pragma-unroll-threshold` command +line option the loop will be partially unrolled subject to the same limit. If +the loop trip count is unknown at compile time the unroller tries to unroll the +loop by a power-of-two factor subject to an unrolled size limit specified by +the `-unroll-threshold` command line option. .. code-block:: c++ Index: include/clang/Basic/AttrDocs.td =================================================================== --- include/clang/Basic/AttrDocs.td +++ include/clang/Basic/AttrDocs.td @@ -1323,8 +1323,11 @@ ``#pragma nounroll``. The pragma is placed immediately before a for, while, do-while, or c++11 range-based for loop. -Specifying ``#pragma unroll`` without a parameter directs the loop unroller to -attempt to fully unroll the loop if the trip count is known at compile time: +Specifying ``#pragma unroll`` without a parameter directs the loop +unroller to attempt to fully unroll the loop if the trip count is +known at compile time. If the trip count is not known at compile time +the loop unroller tries to unroll the loop by a power-of-two factor +subject to a limit on unrolled code size. .. code-block:: c++