From: Sjoerd Meijer Date: Mon, 14 Oct 2019 07:40:36 +0000 (+0000) Subject: [docs] loop pragmas: options implying transformations X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5dceabfe017f72812966261ba8326c83d709729e;p=clang [docs] loop pragmas: options implying transformations Following our discussion on the cfe dev list: http://lists.llvm.org/pipermail/cfe-dev/2019-August/063054.html, I have added a paragraph that is explicit about loop pragmas, and transformation options implying the corresponding transformation. Differential Revision: https://reviews.llvm.org/D66199 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374756 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/LanguageExtensions.rst b/docs/LanguageExtensions.rst index 903d450059..967f4ad9bb 100644 --- a/docs/LanguageExtensions.rst +++ b/docs/LanguageExtensions.rst @@ -3027,6 +3027,14 @@ provides options for vectorization, interleaving, predication, unrolling and distribution. Loop hints can be specified before any loop and will be ignored if the optimization is not safe to apply. +There are loop hints that control transformations (e.g. vectorization, loop +unrolling) and there are loop hints that set transformation options (e.g. +``vectorize_width``, ``unroll_count``). Pragmas setting transformation options +imply the transformation is enabled, as if it was enabled via the corresponding +transformation pragma (e.g. ``vectorize(enable)``). If the transformation is +disabled (e.g. ``vectorize(disable)``), that takes precedence over +transformations option pragmas implying that transformation. + Vectorization, Interleaving, and Predication --------------------------------------------