Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:58

0001 //===--- LoopHint.h - Types for LoopHint ------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_CLANG_PARSE_LOOPHINT_H
0010 #define LLVM_CLANG_PARSE_LOOPHINT_H
0011 
0012 #include "clang/Basic/SourceLocation.h"
0013 
0014 namespace clang {
0015 
0016 class Expr;
0017 struct IdentifierLoc;
0018 
0019 /// Loop optimization hint for loop and unroll pragmas.
0020 struct LoopHint {
0021   // Source range of the directive.
0022   SourceRange Range;
0023   // Identifier corresponding to the name of the pragma.  "loop" for
0024   // "#pragma clang loop" directives and "unroll" for "#pragma unroll"
0025   // hints.
0026   IdentifierLoc *PragmaNameLoc = nullptr;
0027   // Name of the loop hint.  Examples: "unroll", "vectorize".  In the
0028   // "#pragma unroll" and "#pragma nounroll" cases, this is identical to
0029   // PragmaNameLoc.
0030   IdentifierLoc *OptionLoc = nullptr;
0031   // Identifier for the hint state argument.  If null, then the state is
0032   // default value such as for "#pragma unroll".
0033   IdentifierLoc *StateLoc = nullptr;
0034   // Expression for the hint argument if it exists, null otherwise.
0035   Expr *ValueExpr = nullptr;
0036 
0037   LoopHint() = default;
0038 };
0039 
0040 } // end namespace clang
0041 
0042 #endif // LLVM_CLANG_PARSE_LOOPHINT_H