From: Tyler Nowicki Date: Wed, 30 Jul 2014 20:54:33 +0000 (+0000) Subject: Add a state variable to the loop hint attribute. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=229c2a388573e4e5cb5cf5f1e29e3b55949b0297;p=clang Add a state variable to the loop hint attribute. This patch is necessary to support constant expressions which replaces the integer value in the loop hint attribute with an expression. The integer value was also storing the pragma’s state for options like vectorize(enable/disable) and the pragma unroll and nounroll directive. The state variable is introduced to hold the state of those options/pragmas. This moves the validation of the state (keywords) from SemaStmtAttr handler to the loop hint annotation token handler. Reviewed by Aaron Ballman git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214333 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index b914faf6b1..309f00aa26 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -1784,12 +1784,18 @@ def Unaligned : IgnoredAttr { } def LoopHint : Attr { - /// vectorize: vectorizes loop operations if 'value != 0'. - /// vectorize_width: vectorize loop operations with width 'value'. - /// interleave: interleave multiple loop iterations if 'value != 0'. - /// interleave_count: interleaves 'value' loop interations. - /// unroll: fully unroll loop if 'value != 0'. - /// unroll_count: unrolls loop 'value' times. + /// #pragma clang loop