Coverage Report

Created: 2020-02-25 14:32

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/include/clang/AST/StmtOpenMP.h
Line
Count
Source (jump to first uncovered line)
1
//===- StmtOpenMP.h - Classes for OpenMP directives  ------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
/// \file
9
/// This file defines OpenMP AST classes for executable directives and
10
/// clauses.
11
///
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_AST_STMTOPENMP_H
15
#define LLVM_CLANG_AST_STMTOPENMP_H
16
17
#include "clang/AST/Expr.h"
18
#include "clang/AST/OpenMPClause.h"
19
#include "clang/AST/Stmt.h"
20
#include "clang/AST/StmtCXX.h"
21
#include "clang/Basic/OpenMPKinds.h"
22
#include "clang/Basic/SourceLocation.h"
23
24
namespace clang {
25
26
//===----------------------------------------------------------------------===//
27
// AST classes for directives.
28
//===----------------------------------------------------------------------===//
29
30
/// This is a basic class for representing single OpenMP executable
31
/// directive.
32
///
33
class OMPExecutableDirective : public Stmt {
34
  friend class ASTStmtReader;
35
  /// Kind of the directive.
36
  OpenMPDirectiveKind Kind;
37
  /// Starting location of the directive (directive keyword).
38
  SourceLocation StartLoc;
39
  /// Ending location of the directive.
40
  SourceLocation EndLoc;
41
  /// Numbers of clauses.
42
  const unsigned NumClauses;
43
  /// Number of child expressions/stmts.
44
  const unsigned NumChildren;
45
  /// Offset from this to the start of clauses.
46
  /// There are NumClauses pointers to clauses, they are followed by
47
  /// NumChildren pointers to child stmts/exprs (if the directive type
48
  /// requires an associated stmt, then it has to be the first of them).
49
  const unsigned ClausesOffset;
50
51
  /// Get the clauses storage.
52
6.35M
  MutableArrayRef<OMPClause *> getClauses() {
53
6.35M
    OMPClause **ClauseStorage = reinterpret_cast<OMPClause **>(
54
6.35M
        reinterpret_cast<char *>(this) + ClausesOffset);
55
6.35M
    return MutableArrayRef<OMPClause *>(ClauseStorage, NumClauses);
56
6.35M
  }
57
58
protected:
59
  /// Build instance of directive of class \a K.
60
  ///
61
  /// \param SC Statement class.
62
  /// \param K Kind of OpenMP directive.
63
  /// \param StartLoc Starting location of the directive (directive keyword).
64
  /// \param EndLoc Ending location of the directive.
65
  ///
66
  template <typename T>
67
  OMPExecutableDirective(const T *, StmtClass SC, OpenMPDirectiveKind K,
68
                         SourceLocation StartLoc, SourceLocation EndLoc,
69
                         unsigned NumClauses, unsigned NumChildren)
70
      : Stmt(SC), Kind(K), StartLoc(std::move(StartLoc)),
71
        EndLoc(std::move(EndLoc)), NumClauses(NumClauses),
72
        NumChildren(NumChildren),
73
231k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelDirective>(clang::OMPParallelDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
18.4k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPSimdDirective>(clang::OMPSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
5.13k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPForDirective>(clang::OMPForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
5.33k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPForSimdDirective>(clang::OMPForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
4.70k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPSectionsDirective>(clang::OMPSectionsDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
2.84k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPSectionDirective>(clang::OMPSectionDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
867
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPSingleDirective>(clang::OMPSingleDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
1.78k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPMasterDirective>(clang::OMPMasterDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
1.06k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPCriticalDirective>(clang::OMPCriticalDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
1.53k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelForDirective>(clang::OMPParallelForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
4.12k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelForSimdDirective>(clang::OMPParallelForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
5.04k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelMasterDirective>(clang::OMPParallelMasterDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
2.10k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelSectionsDirective>(clang::OMPParallelSectionsDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
2.55k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskDirective>(clang::OMPTaskDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
2.69k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskyieldDirective>(clang::OMPTaskyieldDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
581
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPBarrierDirective>(clang::OMPBarrierDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
379
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskwaitDirective>(clang::OMPTaskwaitDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
565
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskgroupDirective>(clang::OMPTaskgroupDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
2.61k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPCancellationPointDirective>(clang::OMPCancellationPointDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
211
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPCancelDirective>(clang::OMPCancelDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
476
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPFlushDirective>(clang::OMPFlushDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
966
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPOrderedDirective>(clang::OMPOrderedDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
1.14k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPAtomicDirective>(clang::OMPAtomicDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
3.93k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetDirective>(clang::OMPTargetDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
40.2k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetParallelDirective>(clang::OMPTargetParallelDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
4.91k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetParallelForDirective>(clang::OMPTargetParallelForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
5.51k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetDataDirective>(clang::OMPTargetDataDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
1.82k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetEnterDataDirective>(clang::OMPTargetEnterDataDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
1.21k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetExitDataDirective>(clang::OMPTargetExitDataDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
1.22k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTeamsDirective>(clang::OMPTeamsDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
15.7k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskLoopDirective>(clang::OMPTaskLoopDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
3.81k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTaskLoopSimdDirective>(clang::OMPTaskLoopSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
3.69k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPMasterTaskLoopDirective>(clang::OMPMasterTaskLoopDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
2.75k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPMasterTaskLoopSimdDirective>(clang::OMPMasterTaskLoopSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
3.66k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelMasterTaskLoopDirective>(clang::OMPParallelMasterTaskLoopDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
2.11k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPParallelMasterTaskLoopSimdDirective>(clang::OMPParallelMasterTaskLoopSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
3.03k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPDistributeDirective>(clang::OMPDistributeDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
1.81k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetUpdateDirective>(clang::OMPTargetUpdateDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
1.31k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPDistributeParallelForDirective>(clang::OMPDistributeParallelForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
3.91k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPDistributeParallelForSimdDirective>(clang::OMPDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
5.04k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPDistributeSimdDirective>(clang::OMPDistributeSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
3.87k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetParallelForSimdDirective>(clang::OMPTargetParallelForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
5.94k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetSimdDirective>(clang::OMPTargetSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
6.16k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTeamsDistributeDirective>(clang::OMPTeamsDistributeDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
3.41k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTeamsDistributeSimdDirective>(clang::OMPTeamsDistributeSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
4.01k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTeamsDistributeParallelForSimdDirective>(clang::OMPTeamsDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
4.65k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTeamsDistributeParallelForDirective>(clang::OMPTeamsDistributeParallelForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
3.74k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetTeamsDirective>(clang::OMPTargetTeamsDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
5.24k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetTeamsDistributeDirective>(clang::OMPTargetTeamsDistributeDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
4.64k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetTeamsDistributeParallelForDirective>(clang::OMPTargetTeamsDistributeParallelForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
5.46k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetTeamsDistributeParallelForSimdDirective>(clang::OMPTargetTeamsDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
6.90k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
clang::OMPExecutableDirective::OMPExecutableDirective<clang::OMPTargetTeamsDistributeSimdDirective>(clang::OMPTargetTeamsDistributeSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int)
Line
Count
Source
73
6.57k
        ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {}
74
75
  /// Sets the list of variables for this clause.
76
  ///
77
  /// \param Clauses The list of clauses for the directive.
78
  ///
79
  void setClauses(ArrayRef<OMPClause *> Clauses);
80
81
  /// Set the associated statement for the directive.
82
  ///
83
  /// /param S Associated statement.
84
  ///
85
228k
  void setAssociatedStmt(Stmt *S) {
86
228k
    assert(hasAssociatedStmt() && "no associated statement.");
87
228k
    *child_begin() = S;
88
228k
  }
89
90
public:
91
  /// Iterates over expressions/statements used in the construct.
92
  class used_clauses_child_iterator
93
      : public llvm::iterator_adaptor_base<
94
            used_clauses_child_iterator, ArrayRef<OMPClause *>::iterator,
95
            std::forward_iterator_tag, Stmt *, ptrdiff_t, Stmt *, Stmt *> {
96
    ArrayRef<OMPClause *>::iterator End;
97
    OMPClause::child_iterator ChildI, ChildEnd;
98
99
49.6k
    void MoveToNext() {
100
49.6k
      if (ChildI != ChildEnd)
101
19.0k
        return;
102
41.8k
      
while (30.5k
this->I != End) {
103
15.6k
        ++this->I;
104
15.6k
        if (this->I != End) {
105
9.01k
          ChildI = (*this->I)->used_children().begin();
106
9.01k
          ChildEnd = (*this->I)->used_children().end();
107
9.01k
          if (ChildI != ChildEnd)
108
4.44k
            return;
109
9.01k
        }
110
15.6k
      }
111
30.5k
    }
112
113
  public:
114
    explicit used_clauses_child_iterator(ArrayRef<OMPClause *> Clauses)
115
        : used_clauses_child_iterator::iterator_adaptor_base(Clauses.begin()),
116
38.3k
          End(Clauses.end()) {
117
38.3k
      if (this->I != End) {
118
16.2k
        ChildI = (*this->I)->used_children().begin();
119
16.2k
        ChildEnd = (*this->I)->used_children().end();
120
16.2k
        MoveToNext();
121
16.2k
      }
122
38.3k
    }
123
24.3k
    Stmt *operator*() const { return *ChildI; }
124
0
    Stmt *operator->() const { return **this; }
125
126
46.6k
    used_clauses_child_iterator &operator++() {
127
46.6k
      ++ChildI;
128
46.6k
      if (ChildI != ChildEnd)
129
13.2k
        return *this;
130
33.3k
      if (this->I != End) {
131
33.3k
        ++this->I;
132
33.3k
        if (this->I != End) {
133
13.8k
          ChildI = (*this->I)->used_children().begin();
134
13.8k
          ChildEnd = (*this->I)->used_children().end();
135
13.8k
        }
136
33.3k
      }
137
33.3k
      MoveToNext();
138
33.3k
      return *this;
139
33.3k
    }
140
  };
141
142
  static llvm::iterator_range<used_clauses_child_iterator>
143
19.1k
  used_clauses_children(ArrayRef<OMPClause *> Clauses) {
144
19.1k
    return {used_clauses_child_iterator(Clauses),
145
19.1k
            used_clauses_child_iterator(llvm::makeArrayRef(Clauses.end(), 0))};
146
19.1k
  }
147
148
  /// Iterates over a filtered subrange of clauses applied to a
149
  /// directive.
150
  ///
151
  /// This iterator visits only clauses of type SpecificClause.
152
  template <typename SpecificClause>
153
  class specific_clause_iterator
154
      : public llvm::iterator_adaptor_base<
155
            specific_clause_iterator<SpecificClause>,
156
            ArrayRef<OMPClause *>::const_iterator, std::forward_iterator_tag,
157
            const SpecificClause *, ptrdiff_t, const SpecificClause *,
158
            const SpecificClause *> {
159
    ArrayRef<OMPClause *>::const_iterator End;
160
161
964k
    void SkipToNextClause() {
162
1.48M
      while (this->I != End && 
!isa<SpecificClause>(*this->I)558k
)
163
519k
        ++this->I;
164
964k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::SkipToNextClause()
Line
Count
Source
161
12.3k
    void SkipToNextClause() {
162
21.3k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)9.58k
)
163
8.92k
        ++this->I;
164
12.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause>::SkipToNextClause()
Line
Count
Source
161
234k
    void SkipToNextClause() {
162
313k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)83.7k
)
163
78.7k
        ++this->I;
164
234k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::SkipToNextClause()
Line
Count
Source
161
124k
    void SkipToNextClause() {
162
184k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)60.6k
)
163
59.5k
        ++this->I;
164
124k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::SkipToNextClause()
Line
Count
Source
161
91
    void SkipToNextClause() {
162
91
      while (this->I != End && 
!isa<SpecificClause>(*this->I)7
)
163
0
        ++this->I;
164
91
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::SkipToNextClause()
Line
Count
Source
161
13.9k
    void SkipToNextClause() {
162
24.0k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)10.5k
)
163
10.0k
        ++this->I;
164
13.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::SkipToNextClause()
Line
Count
Source
161
11.3k
    void SkipToNextClause() {
162
20.0k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)9.00k
)
163
8.64k
        ++this->I;
164
11.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::SkipToNextClause()
Line
Count
Source
161
52.2k
    void SkipToNextClause() {
162
73.7k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)29.9k
)
163
21.4k
        ++this->I;
164
52.2k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::SkipToNextClause()
Line
Count
Source
161
10.0k
    void SkipToNextClause() {
162
17.6k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)7.58k
)
163
7.50k
        ++this->I;
164
10.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::SkipToNextClause()
Line
Count
Source
161
32.5k
    void SkipToNextClause() {
162
48.8k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)22.7k
)
163
16.2k
        ++this->I;
164
32.5k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::SkipToNextClause()
Line
Count
Source
161
14.0k
    void SkipToNextClause() {
162
22.1k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)8.59k
)
163
8.03k
        ++this->I;
164
14.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::SkipToNextClause()
Line
Count
Source
161
13.4k
    void SkipToNextClause() {
162
21.5k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)8.55k
)
163
8.11k
        ++this->I;
164
13.4k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::SkipToNextClause()
Line
Count
Source
161
39.1k
    void SkipToNextClause() {
162
61.3k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)25.8k
)
163
22.1k
        ++this->I;
164
39.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::SkipToNextClause()
Line
Count
Source
161
12.1k
    void SkipToNextClause() {
162
19.8k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)7.94k
)
163
7.67k
        ++this->I;
164
12.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause>::SkipToNextClause()
Line
Count
Source
161
532
    void SkipToNextClause() {
162
1.10k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)596
)
163
576
        ++this->I;
164
532
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause>::SkipToNextClause()
Line
Count
Source
161
542
    void SkipToNextClause() {
162
1.10k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)596
)
163
566
        ++this->I;
164
542
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::SkipToNextClause()
Line
Count
Source
161
776
    void SkipToNextClause() {
162
1.37k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)736
)
163
600
        ++this->I;
164
776
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause>::SkipToNextClause()
Line
Count
Source
161
19.9k
    void SkipToNextClause() {
162
34.8k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)15.1k
)
163
14.8k
        ++this->I;
164
19.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::SkipToNextClause()
Line
Count
Source
161
78.7k
    void SkipToNextClause() {
162
129k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)52.3k
)
163
50.6k
        ++this->I;
164
78.7k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::SkipToNextClause()
Line
Count
Source
161
59.1k
    void SkipToNextClause() {
162
96.4k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)39.4k
)
163
37.2k
        ++this->I;
164
59.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::SkipToNextClause()
Line
Count
Source
161
80.9k
    void SkipToNextClause() {
162
134k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)55.0k
)
163
53.2k
        ++this->I;
164
80.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::SkipToNextClause()
Line
Count
Source
161
56.3k
    void SkipToNextClause() {
162
95.9k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)41.7k
)
163
39.6k
        ++this->I;
164
56.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::SkipToNextClause()
Line
Count
Source
161
8.43k
    void SkipToNextClause() {
162
12.0k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)4.95k
)
163
3.61k
        ++this->I;
164
8.43k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::SkipToNextClause()
Line
Count
Source
161
13.3k
    void SkipToNextClause() {
162
23.5k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)10.4k
)
163
10.2k
        ++this->I;
164
13.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::SkipToNextClause()
Line
Count
Source
161
13.1k
    void SkipToNextClause() {
162
22.9k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)10.0k
)
163
9.80k
        ++this->I;
164
13.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::SkipToNextClause()
Line
Count
Source
161
19.4k
    void SkipToNextClause() {
162
33.6k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)14.4k
)
163
14.1k
        ++this->I;
164
19.4k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::SkipToNextClause()
Line
Count
Source
161
1.48k
    void SkipToNextClause() {
162
1.79k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)336
)
163
309
        ++this->I;
164
1.48k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::SkipToNextClause()
Line
Count
Source
161
8.35k
    void SkipToNextClause() {
162
13.5k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)5.25k
)
163
5.18k
        ++this->I;
164
8.35k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause>::SkipToNextClause()
Line
Count
Source
161
16.5k
    void SkipToNextClause() {
162
29.2k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)12.7k
)
163
12.7k
        ++this->I;
164
16.5k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::SkipToNextClause()
Line
Count
Source
161
96
    void SkipToNextClause() {
162
113
      while (this->I != End && 
!isa<SpecificClause>(*this->I)35
)
163
17
        ++this->I;
164
96
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::SkipToNextClause()
Line
Count
Source
161
708
    void SkipToNextClause() {
162
1.19k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)507
)
163
485
        ++this->I;
164
708
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::SkipToNextClause()
Line
Count
Source
161
708
    void SkipToNextClause() {
162
1.19k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)507
)
163
485
        ++this->I;
164
708
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::SkipToNextClause()
Line
Count
Source
161
706
    void SkipToNextClause() {
162
1.19k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)507
)
163
487
        ++this->I;
164
706
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::SkipToNextClause()
Line
Count
Source
161
258
    void SkipToNextClause() {
162
367
      while (this->I != End && 
!isa<SpecificClause>(*this->I)125
)
163
109
        ++this->I;
164
258
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::SkipToNextClause()
Line
Count
Source
161
78
    void SkipToNextClause() {
162
81
      while (this->I != End && 
!isa<SpecificClause>(*this->I)29
)
163
3
        ++this->I;
164
78
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::SkipToNextClause()
Line
Count
Source
161
176
    void SkipToNextClause() {
162
224
      while (this->I != End && 
!isa<SpecificClause>(*this->I)64
)
163
48
        ++this->I;
164
176
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::SkipToNextClause()
Line
Count
Source
161
6.74k
    void SkipToNextClause() {
162
10.9k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)4.61k
)
163
4.21k
        ++this->I;
164
6.74k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::SkipToNextClause()
Line
Count
Source
161
28
    void SkipToNextClause() {
162
32
      while (this->I != End && 
!isa<SpecificClause>(*this->I)8
)
163
4
        ++this->I;
164
28
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::SkipToNextClause()
Line
Count
Source
161
936
    void SkipToNextClause() {
162
1.35k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)446
)
163
414
        ++this->I;
164
936
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause>::SkipToNextClause()
Line
Count
Source
161
842
    void SkipToNextClause() {
162
1.22k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)386
)
163
384
        ++this->I;
164
842
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause>::SkipToNextClause()
Line
Count
Source
161
840
    void SkipToNextClause() {
162
1.21k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)382
)
163
378
        ++this->I;
164
840
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause>::SkipToNextClause()
Line
Count
Source
161
834
    void SkipToNextClause() {
162
1.20k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)374
)
163
368
        ++this->I;
164
834
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause>::SkipToNextClause()
Line
Count
Source
161
834
    void SkipToNextClause() {
162
1.17k
      while (this->I != End && 
!isa<SpecificClause>(*this->I)362
)
163
344
        ++this->I;
164
834
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::SkipToNextClause()
Line
Count
Source
161
462
    void SkipToNextClause() {
162
826
      while (this->I != End && 
!isa<SpecificClause>(*this->I)382
)
163
364
        ++this->I;
164
462
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::SkipToNextClause()
Line
Count
Source
161
462
    void SkipToNextClause() {
162
826
      while (this->I != End && 
!isa<SpecificClause>(*this->I)382
)
163
364
        ++this->I;
164
462
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::SkipToNextClause()
Line
Count
Source
161
444
    void SkipToNextClause() {
162
742
      while (this->I != End && 
!isa<SpecificClause>(*this->I)334
)
163
298
        ++this->I;
164
444
    }
165
166
  public:
167
    explicit specific_clause_iterator(ArrayRef<OMPClause *> Clauses)
168
        : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()),
169
934k
          End(Clauses.end()) {
170
934k
      SkipToNextClause();
171
934k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
11.9k
          End(Clauses.end()) {
170
11.9k
      SkipToNextClause();
171
11.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
234k
          End(Clauses.end()) {
170
234k
      SkipToNextClause();
171
234k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
124k
          End(Clauses.end()) {
170
124k
      SkipToNextClause();
171
124k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
84
          End(Clauses.end()) {
170
84
      SkipToNextClause();
171
84
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
13.9k
          End(Clauses.end()) {
170
13.9k
      SkipToNextClause();
171
13.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
11.0k
          End(Clauses.end()) {
170
11.0k
      SkipToNextClause();
171
11.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
43.8k
          End(Clauses.end()) {
170
43.8k
      SkipToNextClause();
171
43.8k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
10.0k
          End(Clauses.end()) {
170
10.0k
      SkipToNextClause();
171
10.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
26.0k
          End(Clauses.end()) {
170
26.0k
      SkipToNextClause();
171
26.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
13.6k
          End(Clauses.end()) {
170
13.6k
      SkipToNextClause();
171
13.6k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
13.0k
          End(Clauses.end()) {
170
13.0k
      SkipToNextClause();
171
13.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
37.3k
          End(Clauses.end()) {
170
37.3k
      SkipToNextClause();
171
37.3k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
11.9k
          End(Clauses.end()) {
170
11.9k
      SkipToNextClause();
171
11.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
512
          End(Clauses.end()) {
170
512
      SkipToNextClause();
171
512
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
512
          End(Clauses.end()) {
170
512
      SkipToNextClause();
171
512
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
640
          End(Clauses.end()) {
170
640
      SkipToNextClause();
171
640
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
19.8k
          End(Clauses.end()) {
170
19.8k
      SkipToNextClause();
171
19.8k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
76.9k
          End(Clauses.end()) {
170
76.9k
      SkipToNextClause();
171
76.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
57.0k
          End(Clauses.end()) {
170
57.0k
      SkipToNextClause();
171
57.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
79.1k
          End(Clauses.end()) {
170
79.1k
      SkipToNextClause();
171
79.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
54.2k
          End(Clauses.end()) {
170
54.2k
      SkipToNextClause();
171
54.2k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
7.32k
          End(Clauses.end()) {
170
7.32k
      SkipToNextClause();
171
7.32k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
13.1k
          End(Clauses.end()) {
170
13.1k
      SkipToNextClause();
171
13.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
12.9k
          End(Clauses.end()) {
170
12.9k
      SkipToNextClause();
171
12.9k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
19.1k
          End(Clauses.end()) {
170
19.1k
      SkipToNextClause();
171
19.1k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
1.46k
          End(Clauses.end()) {
170
1.46k
      SkipToNextClause();
171
1.46k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
8.28k
          End(Clauses.end()) {
170
8.28k
      SkipToNextClause();
171
8.28k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
16.5k
          End(Clauses.end()) {
170
16.5k
      SkipToNextClause();
171
16.5k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
78
          End(Clauses.end()) {
170
78
      SkipToNextClause();
171
78
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
686
          End(Clauses.end()) {
170
686
      SkipToNextClause();
171
686
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
686
          End(Clauses.end()) {
170
686
      SkipToNextClause();
171
686
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
686
          End(Clauses.end()) {
170
686
      SkipToNextClause();
171
686
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
242
          End(Clauses.end()) {
170
242
      SkipToNextClause();
171
242
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
52
          End(Clauses.end()) {
170
52
      SkipToNextClause();
171
52
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
160
          End(Clauses.end()) {
170
160
      SkipToNextClause();
171
160
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
6.34k
          End(Clauses.end()) {
170
6.34k
      SkipToNextClause();
171
6.34k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
24
          End(Clauses.end()) {
170
24
      SkipToNextClause();
171
24
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
904
          End(Clauses.end()) {
170
904
      SkipToNextClause();
171
904
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
840
          End(Clauses.end()) {
170
840
      SkipToNextClause();
171
840
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
836
          End(Clauses.end()) {
170
836
      SkipToNextClause();
171
836
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
828
          End(Clauses.end()) {
170
828
      SkipToNextClause();
171
828
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
816
          End(Clauses.end()) {
170
816
      SkipToNextClause();
171
816
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
444
          End(Clauses.end()) {
170
444
      SkipToNextClause();
171
444
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
444
          End(Clauses.end()) {
170
444
      SkipToNextClause();
171
444
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::specific_clause_iterator(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
169
408
          End(Clauses.end()) {
170
408
      SkipToNextClause();
171
408
    }
172
173
37.0k
    const SpecificClause *operator*() const {
174
37.0k
      return cast<SpecificClause>(*this->I);
175
37.0k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause>::operator*() const
Line
Count
Source
173
5.02k
    const SpecificClause *operator*() const {
174
5.02k
      return cast<SpecificClause>(*this->I);
175
5.02k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::operator*() const
Line
Count
Source
173
1.08k
    const SpecificClause *operator*() const {
174
1.08k
      return cast<SpecificClause>(*this->I);
175
1.08k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::operator*() const
Line
Count
Source
173
7
    const SpecificClause *operator*() const {
174
7
      return cast<SpecificClause>(*this->I);
175
7
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::operator*() const
Line
Count
Source
173
364
    const SpecificClause *operator*() const {
174
364
      return cast<SpecificClause>(*this->I);
175
364
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::operator*() const
Line
Count
Source
173
8.48k
    const SpecificClause *operator*() const {
174
8.48k
      return cast<SpecificClause>(*this->I);
175
8.48k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::operator*() const
Line
Count
Source
173
80
    const SpecificClause *operator*() const {
174
80
      return cast<SpecificClause>(*this->I);
175
80
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::operator*() const
Line
Count
Source
173
6.49k
    const SpecificClause *operator*() const {
174
6.49k
      return cast<SpecificClause>(*this->I);
175
6.49k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::operator*() const
Line
Count
Source
173
403
    const SpecificClause *operator*() const {
174
403
      return cast<SpecificClause>(*this->I);
175
403
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::operator*() const
Line
Count
Source
173
329
    const SpecificClause *operator*() const {
174
329
      return cast<SpecificClause>(*this->I);
175
329
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::operator*() const
Line
Count
Source
173
3.37k
    const SpecificClause *operator*() const {
174
3.37k
      return cast<SpecificClause>(*this->I);
175
3.37k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::operator*() const
Line
Count
Source
173
206
    const SpecificClause *operator*() const {
174
206
      return cast<SpecificClause>(*this->I);
175
206
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause>::operator*() const
Line
Count
Source
173
20
    const SpecificClause *operator*() const {
174
20
      return cast<SpecificClause>(*this->I);
175
20
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause>::operator*() const
Line
Count
Source
173
30
    const SpecificClause *operator*() const {
174
30
      return cast<SpecificClause>(*this->I);
175
30
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::operator*() const
Line
Count
Source
173
136
    const SpecificClause *operator*() const {
174
136
      return cast<SpecificClause>(*this->I);
175
136
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause>::operator*() const
Line
Count
Source
173
132
    const SpecificClause *operator*() const {
174
132
      return cast<SpecificClause>(*this->I);
175
132
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::operator*() const
Line
Count
Source
173
1.73k
    const SpecificClause *operator*() const {
174
1.73k
      return cast<SpecificClause>(*this->I);
175
1.73k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::operator*() const
Line
Count
Source
173
2.14k
    const SpecificClause *operator*() const {
174
2.14k
      return cast<SpecificClause>(*this->I);
175
2.14k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::operator*() const
Line
Count
Source
173
1.79k
    const SpecificClause *operator*() const {
174
1.79k
      return cast<SpecificClause>(*this->I);
175
1.79k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::operator*() const
Line
Count
Source
173
2.11k
    const SpecificClause *operator*() const {
174
2.11k
      return cast<SpecificClause>(*this->I);
175
2.11k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::operator*() const
Line
Count
Source
173
1.16k
    const SpecificClause *operator*() const {
174
1.16k
      return cast<SpecificClause>(*this->I);
175
1.16k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::operator*() const
Line
Count
Source
173
244
    const SpecificClause *operator*() const {
174
244
      return cast<SpecificClause>(*this->I);
175
244
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::operator*() const
Line
Count
Source
173
210
    const SpecificClause *operator*() const {
174
210
      return cast<SpecificClause>(*this->I);
175
210
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::operator*() const
Line
Count
Source
173
310
    const SpecificClause *operator*() const {
174
310
      return cast<SpecificClause>(*this->I);
175
310
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::operator*() const
Line
Count
Source
173
27
    const SpecificClause *operator*() const {
174
27
      return cast<SpecificClause>(*this->I);
175
27
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::operator*() const
Line
Count
Source
173
27
    const SpecificClause *operator*() const {
174
27
      return cast<SpecificClause>(*this->I);
175
27
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::operator*() const
Line
Count
Source
173
74
    const SpecificClause *operator*() const {
174
74
      return cast<SpecificClause>(*this->I);
175
74
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause>::operator*() const
Line
Count
Source
173
3
    const SpecificClause *operator*() const {
174
3
      return cast<SpecificClause>(*this->I);
175
3
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::operator*() const
Line
Count
Source
173
18
    const SpecificClause *operator*() const {
174
18
      return cast<SpecificClause>(*this->I);
175
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::operator*() const
Line
Count
Source
173
22
    const SpecificClause *operator*() const {
174
22
      return cast<SpecificClause>(*this->I);
175
22
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::operator*() const
Line
Count
Source
173
22
    const SpecificClause *operator*() const {
174
22
      return cast<SpecificClause>(*this->I);
175
22
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::operator*() const
Line
Count
Source
173
394
    const SpecificClause *operator*() const {
174
394
      return cast<SpecificClause>(*this->I);
175
394
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::operator*() const
Line
Count
Source
173
20
    const SpecificClause *operator*() const {
174
20
      return cast<SpecificClause>(*this->I);
175
20
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::operator*() const
Line
Count
Source
173
16
    const SpecificClause *operator*() const {
174
16
      return cast<SpecificClause>(*this->I);
175
16
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::operator*() const
Line
Count
Source
173
26
    const SpecificClause *operator*() const {
174
26
      return cast<SpecificClause>(*this->I);
175
26
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::operator*() const
Line
Count
Source
173
16
    const SpecificClause *operator*() const {
174
16
      return cast<SpecificClause>(*this->I);
175
16
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::operator*() const
Line
Count
Source
173
400
    const SpecificClause *operator*() const {
174
400
      return cast<SpecificClause>(*this->I);
175
400
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::operator*() const
Line
Count
Source
173
4
    const SpecificClause *operator*() const {
174
4
      return cast<SpecificClause>(*this->I);
175
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::operator*() const
Line
Count
Source
173
32
    const SpecificClause *operator*() const {
174
32
      return cast<SpecificClause>(*this->I);
175
32
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause>::operator*() const
Line
Count
Source
173
2
    const SpecificClause *operator*() const {
174
2
      return cast<SpecificClause>(*this->I);
175
2
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause>::operator*() const
Line
Count
Source
173
4
    const SpecificClause *operator*() const {
174
4
      return cast<SpecificClause>(*this->I);
175
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause>::operator*() const
Line
Count
Source
173
6
    const SpecificClause *operator*() const {
174
6
      return cast<SpecificClause>(*this->I);
175
6
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause>::operator*() const
Line
Count
Source
173
18
    const SpecificClause *operator*() const {
174
18
      return cast<SpecificClause>(*this->I);
175
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::operator*() const
Line
Count
Source
173
18
    const SpecificClause *operator*() const {
174
18
      return cast<SpecificClause>(*this->I);
175
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::operator*() const
Line
Count
Source
173
18
    const SpecificClause *operator*() const {
174
18
      return cast<SpecificClause>(*this->I);
175
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::operator*() const
Line
Count
Source
173
36
    const SpecificClause *operator*() const {
174
36
      return cast<SpecificClause>(*this->I);
175
36
    }
176
    const SpecificClause *operator->() const { return **this; }
177
178
29.4k
    specific_clause_iterator &operator++() {
179
29.4k
      ++this->I;
180
29.4k
      SkipToNextClause();
181
29.4k
      return *this;
182
29.4k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause>::operator++()
Line
Count
Source
178
7
    specific_clause_iterator &operator++() {
179
7
      ++this->I;
180
7
      SkipToNextClause();
181
7
      return *this;
182
7
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause>::operator++()
Line
Count
Source
178
125
    specific_clause_iterator &operator++() {
179
125
      ++this->I;
180
125
      SkipToNextClause();
181
125
      return *this;
182
125
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause>::operator++()
Line
Count
Source
178
364
    specific_clause_iterator &operator++() {
179
364
      ++this->I;
180
364
      SkipToNextClause();
181
364
      return *this;
182
364
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause>::operator++()
Line
Count
Source
178
8.48k
    specific_clause_iterator &operator++() {
179
8.48k
      ++this->I;
180
8.48k
      SkipToNextClause();
181
8.48k
      return *this;
182
8.48k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause>::operator++()
Line
Count
Source
178
80
    specific_clause_iterator &operator++() {
179
80
      ++this->I;
180
80
      SkipToNextClause();
181
80
      return *this;
182
80
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause>::operator++()
Line
Count
Source
178
6.49k
    specific_clause_iterator &operator++() {
179
6.49k
      ++this->I;
180
6.49k
      SkipToNextClause();
181
6.49k
      return *this;
182
6.49k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause>::operator++()
Line
Count
Source
178
403
    specific_clause_iterator &operator++() {
179
403
      ++this->I;
180
403
      SkipToNextClause();
181
403
      return *this;
182
403
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause>::operator++()
Line
Count
Source
178
329
    specific_clause_iterator &operator++() {
179
329
      ++this->I;
180
329
      SkipToNextClause();
181
329
      return *this;
182
329
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause>::operator++()
Line
Count
Source
178
1.86k
    specific_clause_iterator &operator++() {
179
1.86k
      ++this->I;
180
1.86k
      SkipToNextClause();
181
1.86k
      return *this;
182
1.86k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause>::operator++()
Line
Count
Source
178
206
    specific_clause_iterator &operator++() {
179
206
      ++this->I;
180
206
      SkipToNextClause();
181
206
      return *this;
182
206
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause>::operator++()
Line
Count
Source
178
20
    specific_clause_iterator &operator++() {
179
20
      ++this->I;
180
20
      SkipToNextClause();
181
20
      return *this;
182
20
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause>::operator++()
Line
Count
Source
178
30
    specific_clause_iterator &operator++() {
179
30
      ++this->I;
180
30
      SkipToNextClause();
181
30
      return *this;
182
30
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause>::operator++()
Line
Count
Source
178
136
    specific_clause_iterator &operator++() {
179
136
      ++this->I;
180
136
      SkipToNextClause();
181
136
      return *this;
182
136
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause>::operator++()
Line
Count
Source
178
132
    specific_clause_iterator &operator++() {
179
132
      ++this->I;
180
132
      SkipToNextClause();
181
132
      return *this;
182
132
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause>::operator++()
Line
Count
Source
178
1.73k
    specific_clause_iterator &operator++() {
179
1.73k
      ++this->I;
180
1.73k
      SkipToNextClause();
181
1.73k
      return *this;
182
1.73k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause>::operator++()
Line
Count
Source
178
2.07k
    specific_clause_iterator &operator++() {
179
2.07k
      ++this->I;
180
2.07k
      SkipToNextClause();
181
2.07k
      return *this;
182
2.07k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause>::operator++()
Line
Count
Source
178
1.79k
    specific_clause_iterator &operator++() {
179
1.79k
      ++this->I;
180
1.79k
      SkipToNextClause();
181
1.79k
      return *this;
182
1.79k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause>::operator++()
Line
Count
Source
178
2.11k
    specific_clause_iterator &operator++() {
179
2.11k
      ++this->I;
180
2.11k
      SkipToNextClause();
181
2.11k
      return *this;
182
2.11k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause>::operator++()
Line
Count
Source
178
1.10k
    specific_clause_iterator &operator++() {
179
1.10k
      ++this->I;
180
1.10k
      SkipToNextClause();
181
1.10k
      return *this;
182
1.10k
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause>::operator++()
Line
Count
Source
178
244
    specific_clause_iterator &operator++() {
179
244
      ++this->I;
180
244
      SkipToNextClause();
181
244
      return *this;
182
244
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause>::operator++()
Line
Count
Source
178
210
    specific_clause_iterator &operator++() {
179
210
      ++this->I;
180
210
      SkipToNextClause();
181
210
      return *this;
182
210
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause>::operator++()
Line
Count
Source
178
310
    specific_clause_iterator &operator++() {
179
310
      ++this->I;
180
310
      SkipToNextClause();
181
310
      return *this;
182
310
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause>::operator++()
Line
Count
Source
178
27
    specific_clause_iterator &operator++() {
179
27
      ++this->I;
180
27
      SkipToNextClause();
181
27
      return *this;
182
27
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause>::operator++()
Line
Count
Source
178
27
    specific_clause_iterator &operator++() {
179
27
      ++this->I;
180
27
      SkipToNextClause();
181
27
      return *this;
182
27
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause>::operator++()
Line
Count
Source
178
74
    specific_clause_iterator &operator++() {
179
74
      ++this->I;
180
74
      SkipToNextClause();
181
74
      return *this;
182
74
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause>::operator++()
Line
Count
Source
178
3
    specific_clause_iterator &operator++() {
179
3
      ++this->I;
180
3
      SkipToNextClause();
181
3
      return *this;
182
3
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause>::operator++()
Line
Count
Source
178
18
    specific_clause_iterator &operator++() {
179
18
      ++this->I;
180
18
      SkipToNextClause();
181
18
      return *this;
182
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause>::operator++()
Line
Count
Source
178
22
    specific_clause_iterator &operator++() {
179
22
      ++this->I;
180
22
      SkipToNextClause();
181
22
      return *this;
182
22
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause>::operator++()
Line
Count
Source
178
22
    specific_clause_iterator &operator++() {
179
22
      ++this->I;
180
22
      SkipToNextClause();
181
22
      return *this;
182
22
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause>::operator++()
Line
Count
Source
178
394
    specific_clause_iterator &operator++() {
179
394
      ++this->I;
180
394
      SkipToNextClause();
181
394
      return *this;
182
394
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause>::operator++()
Line
Count
Source
178
20
    specific_clause_iterator &operator++() {
179
20
      ++this->I;
180
20
      SkipToNextClause();
181
20
      return *this;
182
20
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause>::operator++()
Line
Count
Source
178
16
    specific_clause_iterator &operator++() {
179
16
      ++this->I;
180
16
      SkipToNextClause();
181
16
      return *this;
182
16
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause>::operator++()
Line
Count
Source
178
26
    specific_clause_iterator &operator++() {
179
26
      ++this->I;
180
26
      SkipToNextClause();
181
26
      return *this;
182
26
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause>::operator++()
Line
Count
Source
178
16
    specific_clause_iterator &operator++() {
179
16
      ++this->I;
180
16
      SkipToNextClause();
181
16
      return *this;
182
16
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause>::operator++()
Line
Count
Source
178
400
    specific_clause_iterator &operator++() {
179
400
      ++this->I;
180
400
      SkipToNextClause();
181
400
      return *this;
182
400
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause>::operator++()
Line
Count
Source
178
4
    specific_clause_iterator &operator++() {
179
4
      ++this->I;
180
4
      SkipToNextClause();
181
4
      return *this;
182
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause>::operator++()
Line
Count
Source
178
32
    specific_clause_iterator &operator++() {
179
32
      ++this->I;
180
32
      SkipToNextClause();
181
32
      return *this;
182
32
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause>::operator++()
Line
Count
Source
178
2
    specific_clause_iterator &operator++() {
179
2
      ++this->I;
180
2
      SkipToNextClause();
181
2
      return *this;
182
2
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause>::operator++()
Line
Count
Source
178
4
    specific_clause_iterator &operator++() {
179
4
      ++this->I;
180
4
      SkipToNextClause();
181
4
      return *this;
182
4
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause>::operator++()
Line
Count
Source
178
6
    specific_clause_iterator &operator++() {
179
6
      ++this->I;
180
6
      SkipToNextClause();
181
6
      return *this;
182
6
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause>::operator++()
Line
Count
Source
178
18
    specific_clause_iterator &operator++() {
179
18
      ++this->I;
180
18
      SkipToNextClause();
181
18
      return *this;
182
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause>::operator++()
Line
Count
Source
178
18
    specific_clause_iterator &operator++() {
179
18
      ++this->I;
180
18
      SkipToNextClause();
181
18
      return *this;
182
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause>::operator++()
Line
Count
Source
178
18
    specific_clause_iterator &operator++() {
179
18
      ++this->I;
180
18
      SkipToNextClause();
181
18
      return *this;
182
18
    }
clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause>::operator++()
Line
Count
Source
178
36
    specific_clause_iterator &operator++() {
179
36
      ++this->I;
180
36
      SkipToNextClause();
181
36
      return *this;
182
36
    }
183
  };
184
185
  template <typename SpecificClause>
186
  static llvm::iterator_range<specific_clause_iterator<SpecificClause>>
187
467k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
467k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
467k
            specific_clause_iterator<SpecificClause>(
190
467k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
467k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDependClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
5.99k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
5.99k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
5.99k
            specific_clause_iterator<SpecificClause>(
190
5.99k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
5.99k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCollapseClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCollapseClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
117k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
117k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
117k
            specific_clause_iterator<SpecificClause>(
190
117k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
117k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPOrderedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
62.2k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
62.2k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
62.2k
            specific_clause_iterator<SpecificClause>(
190
62.2k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
62.2k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPHintClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
42
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
42
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
42
            specific_clause_iterator<SpecificClause>(
190
42
                llvm::makeArrayRef(Clauses.end(), 0))};
191
42
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNowaitClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
6.95k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
6.95k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
6.95k
            specific_clause_iterator<SpecificClause>(
190
6.95k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
6.95k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDeviceClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
5.50k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
5.50k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
5.50k
            specific_clause_iterator<SpecificClause>(
190
5.50k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
5.50k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFirstprivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
21.9k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
21.9k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
21.9k
            specific_clause_iterator<SpecificClause>(
190
21.9k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
21.9k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIsDevicePtrClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
5.00k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
5.00k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
5.00k
            specific_clause_iterator<SpecificClause>(
190
5.00k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
5.00k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPMapClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
13.0k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
13.0k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
13.0k
            specific_clause_iterator<SpecificClause>(
190
13.0k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
13.0k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTeamsClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
6.83k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
6.83k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
6.83k
            specific_clause_iterator<SpecificClause>(
190
6.83k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
6.83k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPThreadLimitClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
6.54k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
6.54k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
6.54k
            specific_clause_iterator<SpecificClause>(
190
6.54k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
6.54k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIfClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
18.6k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
18.6k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
18.6k
            specific_clause_iterator<SpecificClause>(
190
18.6k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
18.6k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumThreadsClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
5.99k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
5.99k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
5.99k
            specific_clause_iterator<SpecificClause>(
190
5.99k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
5.99k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPToClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
256
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
256
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
256
            specific_clause_iterator<SpecificClause>(
190
256
                llvm::makeArrayRef(Clauses.end(), 0))};
191
256
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFromClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
256
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
256
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
256
            specific_clause_iterator<SpecificClause>(
190
256
                llvm::makeArrayRef(Clauses.end(), 0))};
191
256
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUseDevicePtrClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
320
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
320
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
320
            specific_clause_iterator<SpecificClause>(
190
320
                llvm::makeArrayRef(Clauses.end(), 0))};
191
320
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNontemporalClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
9.91k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
9.91k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
9.91k
            specific_clause_iterator<SpecificClause>(
190
9.91k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
9.91k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPrivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
38.4k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
38.4k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
38.4k
            specific_clause_iterator<SpecificClause>(
190
38.4k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
38.4k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLastprivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
28.5k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
28.5k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
28.5k
            specific_clause_iterator<SpecificClause>(
190
28.5k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
28.5k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPReductionClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
39.5k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
39.5k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
39.5k
            specific_clause_iterator<SpecificClause>(
190
39.5k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
39.5k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLinearClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
27.1k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
27.1k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
27.1k
            specific_clause_iterator<SpecificClause>(
190
27.1k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
27.1k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPScheduleClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
3.66k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
3.66k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
3.66k
            specific_clause_iterator<SpecificClause>(
190
3.66k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
3.66k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSimdlenClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
6.55k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
6.55k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
6.55k
            specific_clause_iterator<SpecificClause>(
190
6.55k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
6.55k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSafelenClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
6.45k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
6.45k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
6.45k
            specific_clause_iterator<SpecificClause>(
190
6.45k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
6.45k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAlignedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
9.59k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
9.59k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
9.59k
            specific_clause_iterator<SpecificClause>(
190
9.59k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
9.59k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyinClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
730
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
730
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
730
            specific_clause_iterator<SpecificClause>(
190
730
                llvm::makeArrayRef(Clauses.end(), 0))};
191
730
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPProcBindClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
4.14k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
4.14k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
4.14k
            specific_clause_iterator<SpecificClause>(
190
4.14k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
4.14k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPOrderClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
8.26k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
8.26k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
8.26k
            specific_clause_iterator<SpecificClause>(
190
8.26k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
8.26k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyprivateClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
39
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
39
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
39
            specific_clause_iterator<SpecificClause>(
190
39
                llvm::makeArrayRef(Clauses.end(), 0))};
191
39
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFinalClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
343
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
343
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
343
            specific_clause_iterator<SpecificClause>(
190
343
                llvm::makeArrayRef(Clauses.end(), 0))};
191
343
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPriorityClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
343
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
343
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
343
            specific_clause_iterator<SpecificClause>(
190
343
                llvm::makeArrayRef(Clauses.end(), 0))};
191
343
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPInReductionClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
343
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
343
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
343
            specific_clause_iterator<SpecificClause>(
190
343
                llvm::makeArrayRef(Clauses.end(), 0))};
191
343
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUntiedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
121
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
121
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
121
            specific_clause_iterator<SpecificClause>(
190
121
                llvm::makeArrayRef(Clauses.end(), 0))};
191
121
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPTaskReductionClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
26
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
26
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
26
            specific_clause_iterator<SpecificClause>(
190
26
                llvm::makeArrayRef(Clauses.end(), 0))};
191
26
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFlushClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
80
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
80
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
80
            specific_clause_iterator<SpecificClause>(
190
80
                llvm::makeArrayRef(Clauses.end(), 0))};
191
80
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDistScheduleClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
3.17k
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
3.17k
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
3.17k
            specific_clause_iterator<SpecificClause>(
190
3.17k
                llvm::makeArrayRef(Clauses.end(), 0))};
191
3.17k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSIMDClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
12
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
12
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
12
            specific_clause_iterator<SpecificClause>(
190
12
                llvm::makeArrayRef(Clauses.end(), 0))};
191
12
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSeqCstClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
452
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
452
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
452
            specific_clause_iterator<SpecificClause>(
190
452
                llvm::makeArrayRef(Clauses.end(), 0))};
191
452
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAcqRelClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
420
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
420
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
420
            specific_clause_iterator<SpecificClause>(
190
420
                llvm::makeArrayRef(Clauses.end(), 0))};
191
420
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAcquireClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
418
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
418
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
418
            specific_clause_iterator<SpecificClause>(
190
418
                llvm::makeArrayRef(Clauses.end(), 0))};
191
418
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPReleaseClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
414
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
414
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
414
            specific_clause_iterator<SpecificClause>(
190
414
                llvm::makeArrayRef(Clauses.end(), 0))};
191
414
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPRelaxedClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
408
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
408
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
408
            specific_clause_iterator<SpecificClause>(
190
408
                llvm::makeArrayRef(Clauses.end(), 0))};
191
408
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNogroupClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
222
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
222
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
222
            specific_clause_iterator<SpecificClause>(
190
222
                llvm::makeArrayRef(Clauses.end(), 0))};
191
222
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPGrainsizeClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
222
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
222
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
222
            specific_clause_iterator<SpecificClause>(
190
222
                llvm::makeArrayRef(Clauses.end(), 0))};
191
222
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTasksClause>(llvm::ArrayRef<clang::OMPClause*>)
Line
Count
Source
187
204
  getClausesOfKind(ArrayRef<OMPClause *> Clauses) {
188
204
    return {specific_clause_iterator<SpecificClause>(Clauses),
189
204
            specific_clause_iterator<SpecificClause>(
190
204
                llvm::makeArrayRef(Clauses.end(), 0))};
191
204
  }
192
193
  template <typename SpecificClause>
194
  llvm::iterator_range<specific_clause_iterator<SpecificClause>>
195
306k
  getClausesOfKind() const {
196
306k
    return getClausesOfKind<SpecificClause>(clauses());
197
306k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDependClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDependClause>() const
Line
Count
Source
195
5.99k
  getClausesOfKind() const {
196
5.99k
    return getClausesOfKind<SpecificClause>(clauses());
197
5.99k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPHintClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPHintClause>() const
Line
Count
Source
195
42
  getClausesOfKind() const {
196
42
    return getClausesOfKind<SpecificClause>(clauses());
197
42
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPOrderedClause>() const
Line
Count
Source
195
19.3k
  getClausesOfKind() const {
196
19.3k
    return getClausesOfKind<SpecificClause>(clauses());
197
19.3k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNowaitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNowaitClause>() const
Line
Count
Source
195
6.95k
  getClausesOfKind() const {
196
6.95k
    return getClausesOfKind<SpecificClause>(clauses());
197
6.95k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDeviceClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDeviceClause>() const
Line
Count
Source
195
5.50k
  getClausesOfKind() const {
196
5.50k
    return getClausesOfKind<SpecificClause>(clauses());
197
5.50k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFirstprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFirstprivateClause>() const
Line
Count
Source
195
21.9k
  getClausesOfKind() const {
196
21.9k
    return getClausesOfKind<SpecificClause>(clauses());
197
21.9k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIsDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIsDevicePtrClause>() const
Line
Count
Source
195
5.00k
  getClausesOfKind() const {
196
5.00k
    return getClausesOfKind<SpecificClause>(clauses());
197
5.00k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPMapClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPMapClause>() const
Line
Count
Source
195
13.0k
  getClausesOfKind() const {
196
13.0k
    return getClausesOfKind<SpecificClause>(clauses());
197
13.0k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTeamsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTeamsClause>() const
Line
Count
Source
195
6.83k
  getClausesOfKind() const {
196
6.83k
    return getClausesOfKind<SpecificClause>(clauses());
197
6.83k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPThreadLimitClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPThreadLimitClause>() const
Line
Count
Source
195
6.54k
  getClausesOfKind() const {
196
6.54k
    return getClausesOfKind<SpecificClause>(clauses());
197
6.54k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPIfClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPIfClause>() const
Line
Count
Source
195
18.6k
  getClausesOfKind() const {
196
18.6k
    return getClausesOfKind<SpecificClause>(clauses());
197
18.6k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumThreadsClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumThreadsClause>() const
Line
Count
Source
195
5.99k
  getClausesOfKind() const {
196
5.99k
    return getClausesOfKind<SpecificClause>(clauses());
197
5.99k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPToClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPToClause>() const
Line
Count
Source
195
256
  getClausesOfKind() const {
196
256
    return getClausesOfKind<SpecificClause>(clauses());
197
256
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFromClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFromClause>() const
Line
Count
Source
195
256
  getClausesOfKind() const {
196
256
    return getClausesOfKind<SpecificClause>(clauses());
197
256
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUseDevicePtrClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUseDevicePtrClause>() const
Line
Count
Source
195
320
  getClausesOfKind() const {
196
320
    return getClausesOfKind<SpecificClause>(clauses());
197
320
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNontemporalClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNontemporalClause>() const
Line
Count
Source
195
9.91k
  getClausesOfKind() const {
196
9.91k
    return getClausesOfKind<SpecificClause>(clauses());
197
9.91k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPrivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPrivateClause>() const
Line
Count
Source
195
38.4k
  getClausesOfKind() const {
196
38.4k
    return getClausesOfKind<SpecificClause>(clauses());
197
38.4k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLastprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLastprivateClause>() const
Line
Count
Source
195
28.5k
  getClausesOfKind() const {
196
28.5k
    return getClausesOfKind<SpecificClause>(clauses());
197
28.5k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPReductionClause>() const
Line
Count
Source
195
39.5k
  getClausesOfKind() const {
196
39.5k
    return getClausesOfKind<SpecificClause>(clauses());
197
39.5k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPLinearClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPLinearClause>() const
Line
Count
Source
195
27.1k
  getClausesOfKind() const {
196
27.1k
    return getClausesOfKind<SpecificClause>(clauses());
197
27.1k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPScheduleClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPScheduleClause>() const
Line
Count
Source
195
3.66k
  getClausesOfKind() const {
196
3.66k
    return getClausesOfKind<SpecificClause>(clauses());
197
3.66k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSimdlenClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSimdlenClause>() const
Line
Count
Source
195
6.55k
  getClausesOfKind() const {
196
6.55k
    return getClausesOfKind<SpecificClause>(clauses());
197
6.55k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSafelenClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSafelenClause>() const
Line
Count
Source
195
6.45k
  getClausesOfKind() const {
196
6.45k
    return getClausesOfKind<SpecificClause>(clauses());
197
6.45k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAlignedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAlignedClause>() const
Line
Count
Source
195
9.59k
  getClausesOfKind() const {
196
9.59k
    return getClausesOfKind<SpecificClause>(clauses());
197
9.59k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyinClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyinClause>() const
Line
Count
Source
195
730
  getClausesOfKind() const {
196
730
    return getClausesOfKind<SpecificClause>(clauses());
197
730
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPProcBindClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPProcBindClause>() const
Line
Count
Source
195
4.14k
  getClausesOfKind() const {
196
4.14k
    return getClausesOfKind<SpecificClause>(clauses());
197
4.14k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPOrderClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPOrderClause>() const
Line
Count
Source
195
8.26k
  getClausesOfKind() const {
196
8.26k
    return getClausesOfKind<SpecificClause>(clauses());
197
8.26k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPCopyprivateClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPCopyprivateClause>() const
Line
Count
Source
195
39
  getClausesOfKind() const {
196
39
    return getClausesOfKind<SpecificClause>(clauses());
197
39
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFinalClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFinalClause>() const
Line
Count
Source
195
343
  getClausesOfKind() const {
196
343
    return getClausesOfKind<SpecificClause>(clauses());
197
343
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPPriorityClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPPriorityClause>() const
Line
Count
Source
195
343
  getClausesOfKind() const {
196
343
    return getClausesOfKind<SpecificClause>(clauses());
197
343
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPInReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPInReductionClause>() const
Line
Count
Source
195
343
  getClausesOfKind() const {
196
343
    return getClausesOfKind<SpecificClause>(clauses());
197
343
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPUntiedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPUntiedClause>() const
Line
Count
Source
195
121
  getClausesOfKind() const {
196
121
    return getClausesOfKind<SpecificClause>(clauses());
197
121
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPTaskReductionClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPTaskReductionClause>() const
Line
Count
Source
195
26
  getClausesOfKind() const {
196
26
    return getClausesOfKind<SpecificClause>(clauses());
197
26
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPFlushClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPFlushClause>() const
Line
Count
Source
195
80
  getClausesOfKind() const {
196
80
    return getClausesOfKind<SpecificClause>(clauses());
197
80
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPDistScheduleClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPDistScheduleClause>() const
Line
Count
Source
195
3.17k
  getClausesOfKind() const {
196
3.17k
    return getClausesOfKind<SpecificClause>(clauses());
197
3.17k
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSIMDClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSIMDClause>() const
Line
Count
Source
195
12
  getClausesOfKind() const {
196
12
    return getClausesOfKind<SpecificClause>(clauses());
197
12
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPSeqCstClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPSeqCstClause>() const
Line
Count
Source
195
452
  getClausesOfKind() const {
196
452
    return getClausesOfKind<SpecificClause>(clauses());
197
452
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcqRelClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAcqRelClause>() const
Line
Count
Source
195
420
  getClausesOfKind() const {
196
420
    return getClausesOfKind<SpecificClause>(clauses());
197
420
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPAcquireClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPAcquireClause>() const
Line
Count
Source
195
418
  getClausesOfKind() const {
196
418
    return getClausesOfKind<SpecificClause>(clauses());
197
418
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPReleaseClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPReleaseClause>() const
Line
Count
Source
195
414
  getClausesOfKind() const {
196
414
    return getClausesOfKind<SpecificClause>(clauses());
197
414
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPRelaxedClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPRelaxedClause>() const
Line
Count
Source
195
408
  getClausesOfKind() const {
196
408
    return getClausesOfKind<SpecificClause>(clauses());
197
408
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNogroupClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNogroupClause>() const
Line
Count
Source
195
222
  getClausesOfKind() const {
196
222
    return getClausesOfKind<SpecificClause>(clauses());
197
222
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPGrainsizeClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPGrainsizeClause>() const
Line
Count
Source
195
222
  getClausesOfKind() const {
196
222
    return getClausesOfKind<SpecificClause>(clauses());
197
222
  }
llvm::iterator_range<clang::OMPExecutableDirective::specific_clause_iterator<clang::OMPNumTasksClause> > clang::OMPExecutableDirective::getClausesOfKind<clang::OMPNumTasksClause>() const
Line
Count
Source
195
204
  getClausesOfKind() const {
196
204
    return getClausesOfKind<SpecificClause>(clauses());
197
204
  }
198
199
  /// Gets a single clause of the specified kind associated with the
200
  /// current directive iff there is only one clause of this kind (and assertion
201
  /// is fired if there is more than one clause is associated with the
202
  /// directive). Returns nullptr if no clause of this kind is associated with
203
  /// the directive.
204
  template <typename SpecificClause>
205
57.9k
  const SpecificClause *getSingleClause() const {
206
57.9k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
57.9k
208
57.9k
    if (Clauses.begin() != Clauses.end()) {
209
3.65k
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
3.65k
             "There are at least 2 clauses of the specified kind");
211
3.65k
      return *Clauses.begin();
212
3.65k
    }
213
54.2k
    return nullptr;
214
54.2k
  }
clang::OMPHintClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPHintClause>() const
Line
Count
Source
205
42
  const SpecificClause *getSingleClause() const {
206
42
    auto Clauses = getClausesOfKind<SpecificClause>();
207
42
208
42
    if (Clauses.begin() != Clauses.end()) {
209
7
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
7
             "There are at least 2 clauses of the specified kind");
211
7
      return *Clauses.begin();
212
7
    }
213
35
    return nullptr;
214
35
  }
clang::OMPDeviceClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDeviceClause>() const
Line
Count
Source
205
5.50k
  const SpecificClause *getSingleClause() const {
206
5.50k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
5.50k
208
5.50k
    if (Clauses.begin() != Clauses.end()) {
209
364
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
364
             "There are at least 2 clauses of the specified kind");
211
364
      return *Clauses.begin();
212
364
    }
213
5.14k
    return nullptr;
214
5.14k
  }
clang::OMPNumTeamsClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumTeamsClause>() const
Line
Count
Source
205
4.02k
  const SpecificClause *getSingleClause() const {
206
4.02k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
4.02k
208
4.02k
    if (Clauses.begin() != Clauses.end()) {
209
403
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
403
             "There are at least 2 clauses of the specified kind");
211
403
      return *Clauses.begin();
212
403
    }
213
3.62k
    return nullptr;
214
3.62k
  }
clang::OMPThreadLimitClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPThreadLimitClause>() const
Line
Count
Source
205
3.97k
  const SpecificClause *getSingleClause() const {
206
3.97k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
3.97k
208
3.97k
    if (Clauses.begin() != Clauses.end()) {
209
329
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
329
             "There are at least 2 clauses of the specified kind");
211
329
      return *Clauses.begin();
212
329
    }
213
3.64k
    return nullptr;
214
3.64k
  }
clang::OMPNumThreadsClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumThreadsClause>() const
Line
Count
Source
205
4.20k
  const SpecificClause *getSingleClause() const {
206
4.20k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
4.20k
208
4.20k
    if (Clauses.begin() != Clauses.end()) {
209
206
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
206
             "There are at least 2 clauses of the specified kind");
211
206
      return *Clauses.begin();
212
206
    }
213
4.00k
    return nullptr;
214
4.00k
  }
clang::OMPSimdlenClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSimdlenClause>() const
Line
Count
Source
205
6.55k
  const SpecificClause *getSingleClause() const {
206
6.55k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
6.55k
208
6.55k
    if (Clauses.begin() != Clauses.end()) {
209
244
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
244
             "There are at least 2 clauses of the specified kind");
211
244
      return *Clauses.begin();
212
244
    }
213
6.31k
    return nullptr;
214
6.31k
  }
clang::OMPSafelenClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSafelenClause>() const
Line
Count
Source
205
6.45k
  const SpecificClause *getSingleClause() const {
206
6.45k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
6.45k
208
6.45k
    if (Clauses.begin() != Clauses.end()) {
209
210
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
210
             "There are at least 2 clauses of the specified kind");
211
210
      return *Clauses.begin();
212
210
    }
213
6.24k
    return nullptr;
214
6.24k
  }
clang::OMPNowaitClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNowaitClause>() const
Line
Count
Source
205
1.12k
  const SpecificClause *getSingleClause() const {
206
1.12k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
1.12k
208
1.12k
    if (Clauses.begin() != Clauses.end()) {
209
27
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
27
             "There are at least 2 clauses of the specified kind");
211
27
      return *Clauses.begin();
212
27
    }
213
1.09k
    return nullptr;
214
1.09k
  }
clang::OMPProcBindClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPProcBindClause>() const
Line
Count
Source
205
4.14k
  const SpecificClause *getSingleClause() const {
206
4.14k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
4.14k
208
4.14k
    if (Clauses.begin() != Clauses.end()) {
209
74
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
74
             "There are at least 2 clauses of the specified kind");
211
74
      return *Clauses.begin();
212
74
    }
213
4.06k
    return nullptr;
214
4.06k
  }
clang::OMPIfClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPIfClause>() const
Line
Count
Source
205
298
  const SpecificClause *getSingleClause() const {
206
298
    auto Clauses = getClausesOfKind<SpecificClause>();
207
298
208
298
    if (Clauses.begin() != Clauses.end()) {
209
136
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
136
             "There are at least 2 clauses of the specified kind");
211
136
      return *Clauses.begin();
212
136
    }
213
162
    return nullptr;
214
162
  }
clang::OMPOrderClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPOrderClause>() const
Line
Count
Source
205
8.26k
  const SpecificClause *getSingleClause() const {
206
8.26k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
8.26k
208
8.26k
    if (Clauses.begin() != Clauses.end()) {
209
3
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
3
             "There are at least 2 clauses of the specified kind");
211
3
      return *Clauses.begin();
212
3
    }
213
8.26k
    return nullptr;
214
8.26k
  }
clang::OMPOrderedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPOrderedClause>() const
Line
Count
Source
205
3.26k
  const SpecificClause *getSingleClause() const {
206
3.26k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
3.26k
208
3.26k
    if (Clauses.begin() != Clauses.end()) {
209
39
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
39
             "There are at least 2 clauses of the specified kind");
211
39
      return *Clauses.begin();
212
39
    }
213
3.22k
    return nullptr;
214
3.22k
  }
clang::OMPScheduleClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPScheduleClause>() const
Line
Count
Source
205
3.26k
  const SpecificClause *getSingleClause() const {
206
3.26k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
3.26k
208
3.26k
    if (Clauses.begin() != Clauses.end()) {
209
997
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
997
             "There are at least 2 clauses of the specified kind");
211
997
      return *Clauses.begin();
212
997
    }
213
2.26k
    return nullptr;
214
2.26k
  }
clang::OMPFinalClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFinalClause>() const
Line
Count
Source
205
343
  const SpecificClause *getSingleClause() const {
206
343
    auto Clauses = getClausesOfKind<SpecificClause>();
207
343
208
343
    if (Clauses.begin() != Clauses.end()) {
209
22
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
22
             "There are at least 2 clauses of the specified kind");
211
22
      return *Clauses.begin();
212
22
    }
213
321
    return nullptr;
214
321
  }
clang::OMPPriorityClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPPriorityClause>() const
Line
Count
Source
205
343
  const SpecificClause *getSingleClause() const {
206
343
    auto Clauses = getClausesOfKind<SpecificClause>();
207
343
208
343
    if (Clauses.begin() != Clauses.end()) {
209
22
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
22
             "There are at least 2 clauses of the specified kind");
211
22
      return *Clauses.begin();
212
22
    }
213
321
    return nullptr;
214
321
  }
clang::OMPUntiedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPUntiedClause>() const
Line
Count
Source
205
121
  const SpecificClause *getSingleClause() const {
206
121
    auto Clauses = getClausesOfKind<SpecificClause>();
207
121
208
121
    if (Clauses.begin() != Clauses.end()) {
209
16
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
16
             "There are at least 2 clauses of the specified kind");
211
16
      return *Clauses.begin();
212
16
    }
213
105
    return nullptr;
214
105
  }
clang::OMPFlushClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPFlushClause>() const
Line
Count
Source
205
80
  const SpecificClause *getSingleClause() const {
206
80
    auto Clauses = getClausesOfKind<SpecificClause>();
207
80
208
80
    if (Clauses.begin() != Clauses.end()) {
209
16
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
16
             "There are at least 2 clauses of the specified kind");
211
16
      return *Clauses.begin();
212
16
    }
213
64
    return nullptr;
214
64
  }
clang::OMPDistScheduleClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPDistScheduleClause>() const
Line
Count
Source
205
3.17k
  const SpecificClause *getSingleClause() const {
206
3.17k
    auto Clauses = getClausesOfKind<SpecificClause>();
207
3.17k
208
3.17k
    if (Clauses.begin() != Clauses.end()) {
209
400
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
400
             "There are at least 2 clauses of the specified kind");
211
400
      return *Clauses.begin();
212
400
    }
213
2.77k
    return nullptr;
214
2.77k
  }
clang::OMPSIMDClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSIMDClause>() const
Line
Count
Source
205
12
  const SpecificClause *getSingleClause() const {
206
12
    auto Clauses = getClausesOfKind<SpecificClause>();
207
12
208
12
    if (Clauses.begin() != Clauses.end()) {
209
4
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
4
             "There are at least 2 clauses of the specified kind");
211
4
      return *Clauses.begin();
212
4
    }
213
8
    return nullptr;
214
8
  }
clang::OMPSeqCstClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPSeqCstClause>() const
Line
Count
Source
205
452
  const SpecificClause *getSingleClause() const {
206
452
    auto Clauses = getClausesOfKind<SpecificClause>();
207
452
208
452
    if (Clauses.begin() != Clauses.end()) {
209
32
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
32
             "There are at least 2 clauses of the specified kind");
211
32
      return *Clauses.begin();
212
32
    }
213
420
    return nullptr;
214
420
  }
clang::OMPAcqRelClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPAcqRelClause>() const
Line
Count
Source
205
420
  const SpecificClause *getSingleClause() const {
206
420
    auto Clauses = getClausesOfKind<SpecificClause>();
207
420
208
420
    if (Clauses.begin() != Clauses.end()) {
209
2
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
2
             "There are at least 2 clauses of the specified kind");
211
2
      return *Clauses.begin();
212
2
    }
213
418
    return nullptr;
214
418
  }
clang::OMPAcquireClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPAcquireClause>() const
Line
Count
Source
205
418
  const SpecificClause *getSingleClause() const {
206
418
    auto Clauses = getClausesOfKind<SpecificClause>();
207
418
208
418
    if (Clauses.begin() != Clauses.end()) {
209
4
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
4
             "There are at least 2 clauses of the specified kind");
211
4
      return *Clauses.begin();
212
4
    }
213
414
    return nullptr;
214
414
  }
clang::OMPReleaseClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPReleaseClause>() const
Line
Count
Source
205
414
  const SpecificClause *getSingleClause() const {
206
414
    auto Clauses = getClausesOfKind<SpecificClause>();
207
414
208
414
    if (Clauses.begin() != Clauses.end()) {
209
6
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
6
             "There are at least 2 clauses of the specified kind");
211
6
      return *Clauses.begin();
212
6
    }
213
408
    return nullptr;
214
408
  }
clang::OMPRelaxedClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPRelaxedClause>() const
Line
Count
Source
205
408
  const SpecificClause *getSingleClause() const {
206
408
    auto Clauses = getClausesOfKind<SpecificClause>();
207
408
208
408
    if (Clauses.begin() != Clauses.end()) {
209
18
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
18
             "There are at least 2 clauses of the specified kind");
211
18
      return *Clauses.begin();
212
18
    }
213
390
    return nullptr;
214
390
  }
clang::OMPNogroupClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNogroupClause>() const
Line
Count
Source
205
222
  const SpecificClause *getSingleClause() const {
206
222
    auto Clauses = getClausesOfKind<SpecificClause>();
207
222
208
222
    if (Clauses.begin() != Clauses.end()) {
209
18
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
18
             "There are at least 2 clauses of the specified kind");
211
18
      return *Clauses.begin();
212
18
    }
213
204
    return nullptr;
214
204
  }
clang::OMPGrainsizeClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPGrainsizeClause>() const
Line
Count
Source
205
222
  const SpecificClause *getSingleClause() const {
206
222
    auto Clauses = getClausesOfKind<SpecificClause>();
207
222
208
222
    if (Clauses.begin() != Clauses.end()) {
209
18
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
18
             "There are at least 2 clauses of the specified kind");
211
18
      return *Clauses.begin();
212
18
    }
213
204
    return nullptr;
214
204
  }
clang::OMPNumTasksClause const* clang::OMPExecutableDirective::getSingleClause<clang::OMPNumTasksClause>() const
Line
Count
Source
205
204
  const SpecificClause *getSingleClause() const {
206
204
    auto Clauses = getClausesOfKind<SpecificClause>();
207
204
208
204
    if (Clauses.begin() != Clauses.end()) {
209
36
      assert(std::next(Clauses.begin()) == Clauses.end() &&
210
36
             "There are at least 2 clauses of the specified kind");
211
36
      return *Clauses.begin();
212
36
    }
213
168
    return nullptr;
214
168
  }
215
216
  /// Returns true if the current directive has one or more clauses of a
217
  /// specific kind.
218
  template <typename SpecificClause>
219
30.4k
  bool hasClausesOfKind() const {
220
30.4k
    auto Clauses = getClausesOfKind<SpecificClause>();
221
30.4k
    return Clauses.begin() != Clauses.end();
222
30.4k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPDependClause>() const
Line
Count
Source
219
5.34k
  bool hasClausesOfKind() const {
220
5.34k
    auto Clauses = getClausesOfKind<SpecificClause>();
221
5.34k
    return Clauses.begin() != Clauses.end();
222
5.34k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNowaitClause>() const
Line
Count
Source
219
5.83k
  bool hasClausesOfKind() const {
220
5.83k
    auto Clauses = getClausesOfKind<SpecificClause>();
221
5.83k
    return Clauses.begin() != Clauses.end();
222
5.83k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNumTeamsClause>() const
Line
Count
Source
219
2.81k
  bool hasClausesOfKind() const {
220
2.81k
    auto Clauses = getClausesOfKind<SpecificClause>();
221
2.81k
    return Clauses.begin() != Clauses.end();
222
2.81k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPThreadLimitClause>() const
Line
Count
Source
219
2.57k
  bool hasClausesOfKind() const {
220
2.57k
    auto Clauses = getClausesOfKind<SpecificClause>();
221
2.57k
    return Clauses.begin() != Clauses.end();
222
2.57k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPIfClause>() const
Line
Count
Source
219
1.81k
  bool hasClausesOfKind() const {
220
1.81k
    auto Clauses = getClausesOfKind<SpecificClause>();
221
1.81k
    return Clauses.begin() != Clauses.end();
222
1.81k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNumThreadsClause>() const
Line
Count
Source
219
1.78k
  bool hasClausesOfKind() const {
220
1.78k
    auto Clauses = getClausesOfKind<SpecificClause>();
221
1.78k
    return Clauses.begin() != Clauses.end();
222
1.78k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPNontemporalClause>() const
Line
Count
Source
219
9.78k
  bool hasClausesOfKind() const {
220
9.78k
    auto Clauses = getClausesOfKind<SpecificClause>();
221
9.78k
    return Clauses.begin() != Clauses.end();
222
9.78k
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPOrderedClause>() const
Line
Count
Source
219
234
  bool hasClausesOfKind() const {
220
234
    auto Clauses = getClausesOfKind<SpecificClause>();
221
234
    return Clauses.begin() != Clauses.end();
222
234
  }
bool clang::OMPExecutableDirective::hasClausesOfKind<clang::OMPScheduleClause>() const
Line
Count
Source
219
231
  bool hasClausesOfKind() const {
220
231
    auto Clauses = getClausesOfKind<SpecificClause>();
221
231
    return Clauses.begin() != Clauses.end();
222
231
  }
223
224
  /// Returns starting location of directive kind.
225
257k
  SourceLocation getBeginLoc() const { return StartLoc; }
226
  /// Returns ending location of directive.
227
126k
  SourceLocation getEndLoc() const { return EndLoc; }
228
229
  /// Set starting location of directive kind.
230
  ///
231
  /// \param Loc New starting location of directive.
232
  ///
233
12.3k
  void setLocStart(SourceLocation Loc) { StartLoc = Loc; }
234
  /// Set ending location of directive.
235
  ///
236
  /// \param Loc New ending location of directive.
237
  ///
238
12.3k
  void setLocEnd(SourceLocation Loc) { EndLoc = Loc; }
239
240
  /// Get number of clauses.
241
300k
  unsigned getNumClauses() const { return NumClauses; }
242
243
  /// Returns specified clause.
244
  ///
245
  /// \param i Number of clause.
246
  ///
247
17.5k
  OMPClause *getClause(unsigned i) const { return clauses()[i]; }
248
249
  /// Returns true if directive has associated statement.
250
8.04M
  bool hasAssociatedStmt() const { return NumChildren > 0; }
251
252
  /// Returns statement associated with the directive.
253
509k
  const Stmt *getAssociatedStmt() const {
254
509k
    assert(hasAssociatedStmt() && "no associated statement.");
255
509k
    return *child_begin();
256
509k
  }
257
1.01M
  Stmt *getAssociatedStmt() {
258
1.01M
    assert(hasAssociatedStmt() && "no associated statement.");
259
1.01M
    return *child_begin();
260
1.01M
  }
261
262
  /// Returns the captured statement associated with the
263
  /// component region within the (combined) directive.
264
  //
265
  // \param RegionKind Component region kind.
266
45.8k
  const CapturedStmt *getCapturedStmt(OpenMPDirectiveKind RegionKind) const {
267
45.8k
    SmallVector<OpenMPDirectiveKind, 4> CaptureRegions;
268
45.8k
    getOpenMPCaptureRegions(CaptureRegions, getDirectiveKind());
269
45.8k
    assert(std::any_of(
270
45.8k
               CaptureRegions.begin(), CaptureRegions.end(),
271
45.8k
               [=](const OpenMPDirectiveKind K) { return K == RegionKind; }) &&
272
45.8k
           "RegionKind not found in OpenMP CaptureRegions.");
273
45.8k
    auto *CS = cast<CapturedStmt>(getAssociatedStmt());
274
84.8k
    for (auto ThisCaptureRegion : CaptureRegions) {
275
84.8k
      if (ThisCaptureRegion == RegionKind)
276
45.8k
        return CS;
277
39.0k
      CS = cast<CapturedStmt>(CS->getCapturedStmt());
278
39.0k
    }
279
45.8k
    
llvm_unreachable0
("Incorrect RegionKind specified for directive.");
280
45.8k
  }
281
282
  /// Get innermost captured statement for the construct.
283
433k
  CapturedStmt *getInnermostCapturedStmt() {
284
433k
    assert(hasAssociatedStmt() && getAssociatedStmt() &&
285
433k
           "Must have associated statement.");
286
433k
    SmallVector<OpenMPDirectiveKind, 4> CaptureRegions;
287
433k
    getOpenMPCaptureRegions(CaptureRegions, getDirectiveKind());
288
433k
    assert(!CaptureRegions.empty() &&
289
433k
           "At least one captured statement must be provided.");
290
433k
    auto *CS = cast<CapturedStmt>(getAssociatedStmt());
291
729k
    for (unsigned Level = CaptureRegions.size(); Level > 1; 
--Level296k
)
292
296k
      CS = cast<CapturedStmt>(CS->getCapturedStmt());
293
433k
    return CS;
294
433k
  }
295
296
144k
  const CapturedStmt *getInnermostCapturedStmt() const {
297
144k
    return const_cast<OMPExecutableDirective *>(this)
298
144k
        ->getInnermostCapturedStmt();
299
144k
  }
300
301
4.12M
  OpenMPDirectiveKind getDirectiveKind() const { return Kind; }
302
303
1.13M
  static bool classof(const Stmt *S) {
304
1.13M
    return S->getStmtClass() >= firstOMPExecutableDirectiveConstant &&
305
1.13M
           
S->getStmtClass() <= lastOMPExecutableDirectiveConstant1.03M
;
306
1.13M
  }
307
308
5.23M
  child_range children() {
309
5.23M
    if (!hasAssociatedStmt())
310
474
      return child_range(child_iterator(), child_iterator());
311
5.23M
    Stmt **ChildStorage = reinterpret_cast<Stmt **>(getClauses().end());
312
5.23M
    /// Do not mark all the special expression/statements as children, except
313
5.23M
    /// for the associated statement.
314
5.23M
    return child_range(ChildStorage, ChildStorage + 1);
315
5.23M
  }
316
317
0
  const_child_range children() const {
318
0
    if (!hasAssociatedStmt())
319
0
      return const_child_range(const_child_iterator(), const_child_iterator());
320
0
    Stmt **ChildStorage = reinterpret_cast<Stmt **>(
321
0
        const_cast<OMPExecutableDirective *>(this)->getClauses().end());
322
0
    return const_child_range(ChildStorage, ChildStorage + 1);
323
0
  }
324
325
162k
  ArrayRef<OMPClause *> clauses() { return getClauses(); }
326
327
733k
  ArrayRef<OMPClause *> clauses() const {
328
733k
    return const_cast<OMPExecutableDirective *>(this)->getClauses();
329
733k
  }
330
331
  /// Returns whether or not this is a Standalone directive.
332
  ///
333
  /// Stand-alone directives are executable directives
334
  /// that have no associated user code.
335
  bool isStandaloneDirective() const;
336
337
  /// Returns the AST node representing OpenMP structured-block of this
338
  /// OpenMP executable directive,
339
  /// Prerequisite: Executable Directive must not be Standalone directive.
340
  const Stmt *getStructuredBlock() const;
341
342
212k
  Stmt *getStructuredBlock() {
343
212k
    return const_cast<Stmt *>(
344
212k
        const_cast<const OMPExecutableDirective *>(this)->getStructuredBlock());
345
212k
  }
346
};
347
348
/// This represents '#pragma omp parallel' directive.
349
///
350
/// \code
351
/// #pragma omp parallel private(a,b) reduction(+: c,d)
352
/// \endcode
353
/// In this example directive '#pragma omp parallel' has clauses 'private'
354
/// with the variables 'a' and 'b' and 'reduction' with operator '+' and
355
/// variables 'c' and 'd'.
356
///
357
class OMPParallelDirective : public OMPExecutableDirective {
358
  friend class ASTStmtReader;
359
  /// true if the construct has inner cancel directive.
360
  bool HasCancel;
361
362
  /// Build directive with the given start and end location.
363
  ///
364
  /// \param StartLoc Starting location of the directive (directive keyword).
365
  /// \param EndLoc Ending Location of the directive.
366
  ///
367
  OMPParallelDirective(SourceLocation StartLoc, SourceLocation EndLoc,
368
                       unsigned NumClauses)
369
      : OMPExecutableDirective(this, OMPParallelDirectiveClass,
370
                               llvm::omp::OMPD_parallel, StartLoc, EndLoc,
371
                               NumClauses, 1),
372
17.8k
        HasCancel(false) {}
373
374
  /// Build an empty directive.
375
  ///
376
  /// \param NumClauses Number of clauses.
377
  ///
378
  explicit OMPParallelDirective(unsigned NumClauses)
379
      : OMPExecutableDirective(this, OMPParallelDirectiveClass,
380
                               llvm::omp::OMPD_parallel, SourceLocation(),
381
                               SourceLocation(), NumClauses, 1),
382
546
        HasCancel(false) {}
383
384
  /// Set cancel state.
385
18.4k
  void setHasCancel(bool Has) { HasCancel = Has; }
386
387
public:
388
  /// Creates directive with a list of \a Clauses.
389
  ///
390
  /// \param C AST context.
391
  /// \param StartLoc Starting location of the directive kind.
392
  /// \param EndLoc Ending Location of the directive.
393
  /// \param Clauses List of clauses.
394
  /// \param AssociatedStmt Statement associated with the directive.
395
  /// \param HasCancel true if this directive has inner cancel directive.
396
  ///
397
  static OMPParallelDirective *
398
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
399
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel);
400
401
  /// Creates an empty directive with the place for \a N clauses.
402
  ///
403
  /// \param C AST context.
404
  /// \param NumClauses Number of clauses.
405
  ///
406
  static OMPParallelDirective *CreateEmpty(const ASTContext &C,
407
                                           unsigned NumClauses, EmptyShell);
408
409
  /// Return true if current directive has inner cancel directive.
410
1.26k
  bool hasCancel() const { return HasCancel; }
411
412
15.7k
  static bool classof(const Stmt *T) {
413
15.7k
    return T->getStmtClass() == OMPParallelDirectiveClass;
414
15.7k
  }
415
};
416
417
/// This is a common base class for loop directives ('omp simd', 'omp
418
/// for', 'omp for simd' etc.). It is responsible for the loop code generation.
419
///
420
class OMPLoopDirective : public OMPExecutableDirective {
421
  friend class ASTStmtReader;
422
  /// Number of collapsed loops as specified by 'collapse' clause.
423
  unsigned CollapsedNum;
424
425
  /// Offsets to the stored exprs.
426
  /// This enumeration contains offsets to all the pointers to children
427
  /// expressions stored in OMPLoopDirective.
428
  /// The first 9 children are necessary for all the loop directives,
429
  /// the next 8 are specific to the worksharing ones, and the next 11 are
430
  /// used for combined constructs containing two pragmas associated to loops.
431
  /// After the fixed children, three arrays of length CollapsedNum are
432
  /// allocated: loop counters, their updates and final values.
433
  /// PrevLowerBound and PrevUpperBound are used to communicate blocking
434
  /// information in composite constructs which require loop blocking
435
  /// DistInc is used to generate the increment expression for the distribute
436
  /// loop when combined with a further nested loop
437
  /// PrevEnsureUpperBound is used as the EnsureUpperBound expression for the
438
  /// for loop when combined with a previous distribute loop in the same pragma
439
  /// (e.g. 'distribute parallel for')
440
  ///
441
  enum {
442
    AssociatedStmtOffset = 0,
443
    IterationVariableOffset = 1,
444
    LastIterationOffset = 2,
445
    CalcLastIterationOffset = 3,
446
    PreConditionOffset = 4,
447
    CondOffset = 5,
448
    InitOffset = 6,
449
    IncOffset = 7,
450
    PreInitsOffset = 8,
451
    // The '...End' enumerators do not correspond to child expressions - they
452
    // specify the offset to the end (and start of the following counters/
453
    // updates/finals/dependent_counters/dependent_inits/finals_conditions
454
    // arrays).
455
    DefaultEnd = 9,
456
    // The following 8 exprs are used by worksharing and distribute loops only.
457
    IsLastIterVariableOffset = 9,
458
    LowerBoundVariableOffset = 10,
459
    UpperBoundVariableOffset = 11,
460
    StrideVariableOffset = 12,
461
    EnsureUpperBoundOffset = 13,
462
    NextLowerBoundOffset = 14,
463
    NextUpperBoundOffset = 15,
464
    NumIterationsOffset = 16,
465
    // Offset to the end for worksharing loop directives.
466
    WorksharingEnd = 17,
467
    PrevLowerBoundVariableOffset = 17,
468
    PrevUpperBoundVariableOffset = 18,
469
    DistIncOffset = 19,
470
    PrevEnsureUpperBoundOffset = 20,
471
    CombinedLowerBoundVariableOffset = 21,
472
    CombinedUpperBoundVariableOffset = 22,
473
    CombinedEnsureUpperBoundOffset = 23,
474
    CombinedInitOffset = 24,
475
    CombinedConditionOffset = 25,
476
    CombinedNextLowerBoundOffset = 26,
477
    CombinedNextUpperBoundOffset = 27,
478
    CombinedDistConditionOffset = 28,
479
    CombinedParForInDistConditionOffset = 29,
480
    // Offset to the end (and start of the following
481
    // counters/updates/finals/dependent_counters/dependent_inits/finals_conditions
482
    // arrays) for combined distribute loop directives.
483
    CombinedDistributeEnd = 30,
484
  };
485
486
  /// Get the counters storage.
487
165k
  MutableArrayRef<Expr *> getCounters() {
488
165k
    Expr **Storage = reinterpret_cast<Expr **>(
489
165k
        &(*(std::next(child_begin(), getArraysOffset(getDirectiveKind())))));
490
165k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
491
165k
  }
492
493
  /// Get the private counters storage.
494
138k
  MutableArrayRef<Expr *> getPrivateCounters() {
495
138k
    Expr **Storage = reinterpret_cast<Expr **>(&*std::next(
496
138k
        child_begin(), getArraysOffset(getDirectiveKind()) + CollapsedNum));
497
138k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
498
138k
  }
499
500
  /// Get the updates storage.
501
122k
  MutableArrayRef<Expr *> getInits() {
502
122k
    Expr **Storage = reinterpret_cast<Expr **>(
503
122k
        &*std::next(child_begin(),
504
122k
                    getArraysOffset(getDirectiveKind()) + 2 * CollapsedNum));
505
122k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
506
122k
  }
507
508
  /// Get the updates storage.
509
128k
  MutableArrayRef<Expr *> getUpdates() {
510
128k
    Expr **Storage = reinterpret_cast<Expr **>(
511
128k
        &*std::next(child_begin(),
512
128k
                    getArraysOffset(getDirectiveKind()) + 3 * CollapsedNum));
513
128k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
514
128k
  }
515
516
  /// Get the final counter updates storage.
517
127k
  MutableArrayRef<Expr *> getFinals() {
518
127k
    Expr **Storage = reinterpret_cast<Expr **>(
519
127k
        &*std::next(child_begin(),
520
127k
                    getArraysOffset(getDirectiveKind()) + 4 * CollapsedNum));
521
127k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
522
127k
  }
523
524
  /// Get the dependent counters storage.
525
122k
  MutableArrayRef<Expr *> getDependentCounters() {
526
122k
    Expr **Storage = reinterpret_cast<Expr **>(
527
122k
        &*std::next(child_begin(),
528
122k
                    getArraysOffset(getDirectiveKind()) + 5 * CollapsedNum));
529
122k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
530
122k
  }
531
532
  /// Get the dependent inits storage.
533
122k
  MutableArrayRef<Expr *> getDependentInits() {
534
122k
    Expr **Storage = reinterpret_cast<Expr **>(
535
122k
        &*std::next(child_begin(),
536
122k
                    getArraysOffset(getDirectiveKind()) + 6 * CollapsedNum));
537
122k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
538
122k
  }
539
540
  /// Get the finals conditions storage.
541
128k
  MutableArrayRef<Expr *> getFinalsConditions() {
542
128k
    Expr **Storage = reinterpret_cast<Expr **>(
543
128k
        &*std::next(child_begin(),
544
128k
                    getArraysOffset(getDirectiveKind()) + 7 * CollapsedNum));
545
128k
    return MutableArrayRef<Expr *>(Storage, CollapsedNum);
546
128k
  }
547
548
protected:
549
  /// Build instance of loop directive of class \a Kind.
550
  ///
551
  /// \param SC Statement class.
552
  /// \param Kind Kind of OpenMP directive.
553
  /// \param StartLoc Starting location of the directive (directive keyword).
554
  /// \param EndLoc Ending location of the directive.
555
  /// \param CollapsedNum Number of collapsed loops from 'collapse' clause.
556
  /// \param NumClauses Number of clauses.
557
  /// \param NumSpecialChildren Number of additional directive-specific stmts.
558
  ///
559
  template <typename T>
560
  OMPLoopDirective(const T *That, StmtClass SC, OpenMPDirectiveKind Kind,
561
                   SourceLocation StartLoc, SourceLocation EndLoc,
562
                   unsigned CollapsedNum, unsigned NumClauses,
563
                   unsigned NumSpecialChildren = 0)
564
      : OMPExecutableDirective(That, SC, Kind, StartLoc, EndLoc, NumClauses,
565
                               numLoopChildren(CollapsedNum, Kind) +
566
                                   NumSpecialChildren),
567
115k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPSimdDirective>(clang::OMPSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
5.13k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPForDirective>(clang::OMPForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
5.33k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPForSimdDirective>(clang::OMPForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
4.70k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPParallelForDirective>(clang::OMPParallelForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
4.12k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPParallelForSimdDirective>(clang::OMPParallelForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
5.04k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetParallelForDirective>(clang::OMPTargetParallelForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
5.51k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTaskLoopDirective>(clang::OMPTaskLoopDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
3.81k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTaskLoopSimdDirective>(clang::OMPTaskLoopSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
3.69k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPMasterTaskLoopDirective>(clang::OMPMasterTaskLoopDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
2.75k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPMasterTaskLoopSimdDirective>(clang::OMPMasterTaskLoopSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
3.66k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPParallelMasterTaskLoopDirective>(clang::OMPParallelMasterTaskLoopDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
2.11k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPParallelMasterTaskLoopSimdDirective>(clang::OMPParallelMasterTaskLoopSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
3.03k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPDistributeDirective>(clang::OMPDistributeDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
1.81k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPDistributeParallelForDirective>(clang::OMPDistributeParallelForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
3.91k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPDistributeParallelForSimdDirective>(clang::OMPDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
5.04k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPDistributeSimdDirective>(clang::OMPDistributeSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
3.87k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetParallelForSimdDirective>(clang::OMPTargetParallelForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
5.94k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetSimdDirective>(clang::OMPTargetSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
6.16k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTeamsDistributeDirective>(clang::OMPTeamsDistributeDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
3.41k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTeamsDistributeSimdDirective>(clang::OMPTeamsDistributeSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
4.01k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTeamsDistributeParallelForSimdDirective>(clang::OMPTeamsDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
4.65k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTeamsDistributeParallelForDirective>(clang::OMPTeamsDistributeParallelForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
3.74k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetTeamsDistributeDirective>(clang::OMPTargetTeamsDistributeDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
4.64k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetTeamsDistributeParallelForDirective>(clang::OMPTargetTeamsDistributeParallelForDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
5.46k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetTeamsDistributeParallelForSimdDirective>(clang::OMPTargetTeamsDistributeParallelForSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
6.90k
        CollapsedNum(CollapsedNum) {}
clang::OMPLoopDirective::OMPLoopDirective<clang::OMPTargetTeamsDistributeSimdDirective>(clang::OMPTargetTeamsDistributeSimdDirective const*, clang::Stmt::StmtClass, llvm::omp::Directive, clang::SourceLocation, clang::SourceLocation, unsigned int, unsigned int, unsigned int)
Line
Count
Source
567
6.57k
        CollapsedNum(CollapsedNum) {}
568
569
  /// Offset to the start of children expression arrays.
570
1.28M
  static unsigned getArraysOffset(OpenMPDirectiveKind Kind) {
571
1.28M
    if (isOpenMPLoopBoundSharingDirective(Kind))
572
352k
      return CombinedDistributeEnd;
573
933k
    if (isOpenMPWorksharingDirective(Kind) || 
isOpenMPTaskLoopDirective(Kind)599k
||
574
933k
        
isOpenMPDistributeDirective(Kind)403k
)
575
805k
      return WorksharingEnd;
576
128k
    return DefaultEnd;
577
128k
  }
578
579
  /// Children number.
580
  static unsigned numLoopChildren(unsigned CollapsedNum,
581
230k
                                  OpenMPDirectiveKind Kind) {
582
230k
    return getArraysOffset(Kind) +
583
230k
           8 * CollapsedNum; // Counters, PrivateCounters, Inits,
584
230k
                             // Updates, Finals, DependentCounters,
585
230k
                             // DependentInits, FinalsConditions.
586
230k
  }
587
588
115k
  void setIterationVariable(Expr *IV) {
589
115k
    *std::next(child_begin(), IterationVariableOffset) = IV;
590
115k
  }
591
115k
  void setLastIteration(Expr *LI) {
592
115k
    *std::next(child_begin(), LastIterationOffset) = LI;
593
115k
  }
594
115k
  void setCalcLastIteration(Expr *CLI) {
595
115k
    *std::next(child_begin(), CalcLastIterationOffset) = CLI;
596
115k
  }
597
115k
  void setPreCond(Expr *PC) {
598
115k
    *std::next(child_begin(), PreConditionOffset) = PC;
599
115k
  }
600
115k
  void setCond(Expr *Cond) {
601
115k
    *std::next(child_begin(), CondOffset) = Cond;
602
115k
  }
603
115k
  void setInit(Expr *Init) { *std::next(child_begin(), InitOffset) = Init; }
604
115k
  void setInc(Expr *Inc) { *std::next(child_begin(), IncOffset) = Inc; }
605
115k
  void setPreInits(Stmt *PreInits) {
606
115k
    *std::next(child_begin(), PreInitsOffset) = PreInits;
607
115k
  }
608
103k
  void setIsLastIterVariable(Expr *IL) {
609
103k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
610
103k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
611
103k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
612
103k
           "expected worksharing loop directive");
613
103k
    *std::next(child_begin(), IsLastIterVariableOffset) = IL;
614
103k
  }
615
103k
  void setLowerBoundVariable(Expr *LB) {
616
103k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
617
103k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
618
103k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
619
103k
           "expected worksharing loop directive");
620
103k
    *std::next(child_begin(), LowerBoundVariableOffset) = LB;
621
103k
  }
622
103k
  void setUpperBoundVariable(Expr *UB) {
623
103k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
624
103k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
625
103k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
626
103k
           "expected worksharing loop directive");
627
103k
    *std::next(child_begin(), UpperBoundVariableOffset) = UB;
628
103k
  }
629
103k
  void setStrideVariable(Expr *ST) {
630
103k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
631
103k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
632
103k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
633
103k
           "expected worksharing loop directive");
634
103k
    *std::next(child_begin(), StrideVariableOffset) = ST;
635
103k
  }
636
103k
  void setEnsureUpperBound(Expr *EUB) {
637
103k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
638
103k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
639
103k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
640
103k
           "expected worksharing loop directive");
641
103k
    *std::next(child_begin(), EnsureUpperBoundOffset) = EUB;
642
103k
  }
643
103k
  void setNextLowerBound(Expr *NLB) {
644
103k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
645
103k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
646
103k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
647
103k
           "expected worksharing loop directive");
648
103k
    *std::next(child_begin(), NextLowerBoundOffset) = NLB;
649
103k
  }
650
103k
  void setNextUpperBound(Expr *NUB) {
651
103k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
652
103k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
653
103k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
654
103k
           "expected worksharing loop directive");
655
103k
    *std::next(child_begin(), NextUpperBoundOffset) = NUB;
656
103k
  }
657
103k
  void setNumIterations(Expr *NI) {
658
103k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
659
103k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
660
103k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
661
103k
           "expected worksharing loop directive");
662
103k
    *std::next(child_begin(), NumIterationsOffset) = NI;
663
103k
  }
664
29.7k
  void setPrevLowerBoundVariable(Expr *PrevLB) {
665
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
666
29.7k
           "expected loop bound sharing directive");
667
29.7k
    *std::next(child_begin(), PrevLowerBoundVariableOffset) = PrevLB;
668
29.7k
  }
669
29.7k
  void setPrevUpperBoundVariable(Expr *PrevUB) {
670
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
671
29.7k
           "expected loop bound sharing directive");
672
29.7k
    *std::next(child_begin(), PrevUpperBoundVariableOffset) = PrevUB;
673
29.7k
  }
674
29.7k
  void setDistInc(Expr *DistInc) {
675
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
676
29.7k
           "expected loop bound sharing directive");
677
29.7k
    *std::next(child_begin(), DistIncOffset) = DistInc;
678
29.7k
  }
679
29.7k
  void setPrevEnsureUpperBound(Expr *PrevEUB) {
680
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
681
29.7k
           "expected loop bound sharing directive");
682
29.7k
    *std::next(child_begin(), PrevEnsureUpperBoundOffset) = PrevEUB;
683
29.7k
  }
684
29.7k
  void setCombinedLowerBoundVariable(Expr *CombLB) {
685
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
686
29.7k
           "expected loop bound sharing directive");
687
29.7k
    *std::next(child_begin(), CombinedLowerBoundVariableOffset) = CombLB;
688
29.7k
  }
689
29.7k
  void setCombinedUpperBoundVariable(Expr *CombUB) {
690
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
691
29.7k
           "expected loop bound sharing directive");
692
29.7k
    *std::next(child_begin(), CombinedUpperBoundVariableOffset) = CombUB;
693
29.7k
  }
694
29.7k
  void setCombinedEnsureUpperBound(Expr *CombEUB) {
695
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
696
29.7k
           "expected loop bound sharing directive");
697
29.7k
    *std::next(child_begin(), CombinedEnsureUpperBoundOffset) = CombEUB;
698
29.7k
  }
699
29.7k
  void setCombinedInit(Expr *CombInit) {
700
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
701
29.7k
           "expected loop bound sharing directive");
702
29.7k
    *std::next(child_begin(), CombinedInitOffset) = CombInit;
703
29.7k
  }
704
29.7k
  void setCombinedCond(Expr *CombCond) {
705
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
706
29.7k
           "expected loop bound sharing directive");
707
29.7k
    *std::next(child_begin(), CombinedConditionOffset) = CombCond;
708
29.7k
  }
709
29.7k
  void setCombinedNextLowerBound(Expr *CombNLB) {
710
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
711
29.7k
           "expected loop bound sharing directive");
712
29.7k
    *std::next(child_begin(), CombinedNextLowerBoundOffset) = CombNLB;
713
29.7k
  }
714
29.7k
  void setCombinedNextUpperBound(Expr *CombNUB) {
715
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
716
29.7k
           "expected loop bound sharing directive");
717
29.7k
    *std::next(child_begin(), CombinedNextUpperBoundOffset) = CombNUB;
718
29.7k
  }
719
29.7k
  void setCombinedDistCond(Expr *CombDistCond) {
720
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
721
29.7k
           "expected loop bound distribute sharing directive");
722
29.7k
    *std::next(child_begin(), CombinedDistConditionOffset) = CombDistCond;
723
29.7k
  }
724
29.7k
  void setCombinedParForInDistCond(Expr *CombParForInDistCond) {
725
29.7k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
726
29.7k
           "expected loop bound distribute sharing directive");
727
29.7k
    *std::next(child_begin(),
728
29.7k
               CombinedParForInDistConditionOffset) = CombParForInDistCond;
729
29.7k
  }
730
  void setCounters(ArrayRef<Expr *> A);
731
  void setPrivateCounters(ArrayRef<Expr *> A);
732
  void setInits(ArrayRef<Expr *> A);
733
  void setUpdates(ArrayRef<Expr *> A);
734
  void setFinals(ArrayRef<Expr *> A);
735
  void setDependentCounters(ArrayRef<Expr *> A);
736
  void setDependentInits(ArrayRef<Expr *> A);
737
  void setFinalsConditions(ArrayRef<Expr *> A);
738
739
public:
740
  /// The expressions built to support OpenMP loops in combined/composite
741
  /// pragmas (e.g. pragma omp distribute parallel for)
742
  struct DistCombinedHelperExprs {
743
    /// DistributeLowerBound - used when composing 'omp distribute' with
744
    /// 'omp for' in a same construct.
745
    Expr *LB;
746
    /// DistributeUpperBound - used when composing 'omp distribute' with
747
    /// 'omp for' in a same construct.
748
    Expr *UB;
749
    /// DistributeEnsureUpperBound - used when composing 'omp distribute'
750
    ///  with 'omp for' in a same construct, EUB depends on DistUB
751
    Expr *EUB;
752
    /// Distribute loop iteration variable init used when composing 'omp
753
    /// distribute'
754
    ///  with 'omp for' in a same construct
755
    Expr *Init;
756
    /// Distribute Loop condition used when composing 'omp distribute'
757
    ///  with 'omp for' in a same construct
758
    Expr *Cond;
759
    /// Update of LowerBound for statically scheduled omp loops for
760
    /// outer loop in combined constructs (e.g. 'distribute parallel for')
761
    Expr *NLB;
762
    /// Update of UpperBound for statically scheduled omp loops for
763
    /// outer loop in combined constructs (e.g. 'distribute parallel for')
764
    Expr *NUB;
765
    /// Distribute Loop condition used when composing 'omp distribute'
766
    ///  with 'omp for' in a same construct when schedule is chunked.
767
    Expr *DistCond;
768
    /// 'omp parallel for' loop condition used when composed with
769
    /// 'omp distribute' in the same construct and when schedule is
770
    /// chunked and the chunk size is 1.
771
    Expr *ParForInDistCond;
772
  };
773
774
  /// The expressions built for the OpenMP loop CodeGen for the
775
  /// whole collapsed loop nest.
776
  struct HelperExprs {
777
    /// Loop iteration variable.
778
    Expr *IterationVarRef;
779
    /// Loop last iteration number.
780
    Expr *LastIteration;
781
    /// Loop number of iterations.
782
    Expr *NumIterations;
783
    /// Calculation of last iteration.
784
    Expr *CalcLastIteration;
785
    /// Loop pre-condition.
786
    Expr *PreCond;
787
    /// Loop condition.
788
    Expr *Cond;
789
    /// Loop iteration variable init.
790
    Expr *Init;
791
    /// Loop increment.
792
    Expr *Inc;
793
    /// IsLastIteration - local flag variable passed to runtime.
794
    Expr *IL;
795
    /// LowerBound - local variable passed to runtime.
796
    Expr *LB;
797
    /// UpperBound - local variable passed to runtime.
798
    Expr *UB;
799
    /// Stride - local variable passed to runtime.
800
    Expr *ST;
801
    /// EnsureUpperBound -- expression UB = min(UB, NumIterations).
802
    Expr *EUB;
803
    /// Update of LowerBound for statically scheduled 'omp for' loops.
804
    Expr *NLB;
805
    /// Update of UpperBound for statically scheduled 'omp for' loops.
806
    Expr *NUB;
807
    /// PreviousLowerBound - local variable passed to runtime in the
808
    /// enclosing schedule or null if that does not apply.
809
    Expr *PrevLB;
810
    /// PreviousUpperBound - local variable passed to runtime in the
811
    /// enclosing schedule or null if that does not apply.
812
    Expr *PrevUB;
813
    /// DistInc - increment expression for distribute loop when found
814
    /// combined with a further loop level (e.g. in 'distribute parallel for')
815
    /// expression IV = IV + ST
816
    Expr *DistInc;
817
    /// PrevEUB - expression similar to EUB but to be used when loop
818
    /// scheduling uses PrevLB and PrevUB (e.g.  in 'distribute parallel for'
819
    /// when ensuring that the UB is either the calculated UB by the runtime or
820
    /// the end of the assigned distribute chunk)
821
    /// expression UB = min (UB, PrevUB)
822
    Expr *PrevEUB;
823
    /// Counters Loop counters.
824
    SmallVector<Expr *, 4> Counters;
825
    /// PrivateCounters Loop counters.
826
    SmallVector<Expr *, 4> PrivateCounters;
827
    /// Expressions for loop counters inits for CodeGen.
828
    SmallVector<Expr *, 4> Inits;
829
    /// Expressions for loop counters update for CodeGen.
830
    SmallVector<Expr *, 4> Updates;
831
    /// Final loop counter values for GodeGen.
832
    SmallVector<Expr *, 4> Finals;
833
    /// List of counters required for the generation of the non-rectangular
834
    /// loops.
835
    SmallVector<Expr *, 4> DependentCounters;
836
    /// List of initializers required for the generation of the non-rectangular
837
    /// loops.
838
    SmallVector<Expr *, 4> DependentInits;
839
    /// List of final conditions required for the generation of the
840
    /// non-rectangular loops.
841
    SmallVector<Expr *, 4> FinalsConditions;
842
    /// Init statement for all captured expressions.
843
    Stmt *PreInits;
844
845
    /// Expressions used when combining OpenMP loop pragmas
846
    DistCombinedHelperExprs DistCombinedFields;
847
848
    /// Check if all the expressions are built (does not check the
849
    /// worksharing ones).
850
77.0k
    bool builtAll() {
851
77.0k
      return IterationVarRef != nullptr && LastIteration != nullptr &&
852
77.0k
             NumIterations != nullptr && PreCond != nullptr &&
853
77.0k
             Cond != nullptr && Init != nullptr && Inc != nullptr;
854
77.0k
    }
855
856
    /// Initialize all the fields to null.
857
    /// \param Size Number of elements in the
858
    /// counters/finals/updates/dependent_counters/dependent_inits/finals_conditions
859
    /// arrays.
860
110k
    void clear(unsigned Size) {
861
110k
      IterationVarRef = nullptr;
862
110k
      LastIteration = nullptr;
863
110k
      CalcLastIteration = nullptr;
864
110k
      PreCond = nullptr;
865
110k
      Cond = nullptr;
866
110k
      Init = nullptr;
867
110k
      Inc = nullptr;
868
110k
      IL = nullptr;
869
110k
      LB = nullptr;
870
110k
      UB = nullptr;
871
110k
      ST = nullptr;
872
110k
      EUB = nullptr;
873
110k
      NLB = nullptr;
874
110k
      NUB = nullptr;
875
110k
      NumIterations = nullptr;
876
110k
      PrevLB = nullptr;
877
110k
      PrevUB = nullptr;
878
110k
      DistInc = nullptr;
879
110k
      PrevEUB = nullptr;
880
110k
      Counters.resize(Size);
881
110k
      PrivateCounters.resize(Size);
882
110k
      Inits.resize(Size);
883
110k
      Updates.resize(Size);
884
110k
      Finals.resize(Size);
885
110k
      DependentCounters.resize(Size);
886
110k
      DependentInits.resize(Size);
887
110k
      FinalsConditions.resize(Size);
888
222k
      for (unsigned i = 0; i < Size; 
++i112k
) {
889
112k
        Counters[i] = nullptr;
890
112k
        PrivateCounters[i] = nullptr;
891
112k
        Inits[i] = nullptr;
892
112k
        Updates[i] = nullptr;
893
112k
        Finals[i] = nullptr;
894
112k
        DependentCounters[i] = nullptr;
895
112k
        DependentInits[i] = nullptr;
896
112k
        FinalsConditions[i] = nullptr;
897
112k
      }
898
110k
      PreInits = nullptr;
899
110k
      DistCombinedFields.LB = nullptr;
900
110k
      DistCombinedFields.UB = nullptr;
901
110k
      DistCombinedFields.EUB = nullptr;
902
110k
      DistCombinedFields.Init = nullptr;
903
110k
      DistCombinedFields.Cond = nullptr;
904
110k
      DistCombinedFields.NLB = nullptr;
905
110k
      DistCombinedFields.NUB = nullptr;
906
110k
      DistCombinedFields.DistCond = nullptr;
907
110k
      DistCombinedFields.ParForInDistCond = nullptr;
908
110k
    }
909
  };
910
911
  /// Get number of collapsed loops.
912
965k
  unsigned getCollapsedNumber() const { return CollapsedNum; }
913
914
28.8k
  Expr *getIterationVariable() const {
915
28.8k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
916
28.8k
        *std::next(child_begin(), IterationVariableOffset)));
917
28.8k
  }
918
15.4k
  Expr *getLastIteration() const {
919
15.4k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
920
15.4k
        *std::next(child_begin(), LastIterationOffset)));
921
15.4k
  }
922
5.33k
  Expr *getCalcLastIteration() const {
923
5.33k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
924
5.33k
        *std::next(child_begin(), CalcLastIterationOffset)));
925
5.33k
  }
926
17.2k
  Expr *getPreCond() const {
927
17.2k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
928
17.2k
        *std::next(child_begin(), PreConditionOffset)));
929
17.2k
  }
930
13.2k
  Expr *getCond() const {
931
13.2k
    return const_cast<Expr *>(
932
13.2k
        reinterpret_cast<const Expr *>(*std::next(child_begin(), CondOffset)));
933
13.2k
  }
934
13.3k
  Expr *getInit() const {
935
13.3k
    return const_cast<Expr *>(
936
13.3k
        reinterpret_cast<const Expr *>(*std::next(child_begin(), InitOffset)));
937
13.3k
  }
938
13.4k
  Expr *getInc() const {
939
13.4k
    return const_cast<Expr *>(
940
13.4k
        reinterpret_cast<const Expr *>(*std::next(child_begin(), IncOffset)));
941
13.4k
  }
942
12.5k
  const Stmt *getPreInits() const {
943
12.5k
    return *std::next(child_begin(), PreInitsOffset);
944
12.5k
  }
945
5.33k
  Stmt *getPreInits() { return *std::next(child_begin(), PreInitsOffset); }
946
11.4k
  Expr *getIsLastIterVariable() const {
947
11.4k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
948
11.4k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
949
11.4k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
950
11.4k
           "expected worksharing loop directive");
951
11.4k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
952
11.4k
        *std::next(child_begin(), IsLastIterVariableOffset)));
953
11.4k
  }
954
11.9k
  Expr *getLowerBoundVariable() const {
955
11.9k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
956
11.9k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
957
11.9k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
958
11.9k
           "expected worksharing loop directive");
959
11.9k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
960
11.9k
        *std::next(child_begin(), LowerBoundVariableOffset)));
961
11.9k
  }
962
11.9k
  Expr *getUpperBoundVariable() const {
963
11.9k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
964
11.9k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
965
11.9k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
966
11.9k
           "expected worksharing loop directive");
967
11.9k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
968
11.9k
        *std::next(child_begin(), UpperBoundVariableOffset)));
969
11.9k
  }
970
11.6k
  Expr *getStrideVariable() const {
971
11.6k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
972
11.6k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
973
11.6k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
974
11.6k
           "expected worksharing loop directive");
975
11.6k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
976
11.6k
        *std::next(child_begin(), StrideVariableOffset)));
977
11.6k
  }
978
9.84k
  Expr *getEnsureUpperBound() const {
979
9.84k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
980
9.84k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
981
9.84k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
982
9.84k
           "expected worksharing loop directive");
983
9.84k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
984
9.84k
        *std::next(child_begin(), EnsureUpperBoundOffset)));
985
9.84k
  }
986
5.74k
  Expr *getNextLowerBound() const {
987
5.74k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
988
5.74k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
989
5.74k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
990
5.74k
           "expected worksharing loop directive");
991
5.74k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
992
5.74k
        *std::next(child_begin(), NextLowerBoundOffset)));
993
5.74k
  }
994
5.74k
  Expr *getNextUpperBound() const {
995
5.74k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
996
5.74k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
997
5.74k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
998
5.74k
           "expected worksharing loop directive");
999
5.74k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1000
5.74k
        *std::next(child_begin(), NextUpperBoundOffset)));
1001
5.74k
  }
1002
7.20k
  Expr *getNumIterations() const {
1003
7.20k
    assert((isOpenMPWorksharingDirective(getDirectiveKind()) ||
1004
7.20k
            isOpenMPTaskLoopDirective(getDirectiveKind()) ||
1005
7.20k
            isOpenMPDistributeDirective(getDirectiveKind())) &&
1006
7.20k
           "expected worksharing loop directive");
1007
7.20k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1008
7.20k
        *std::next(child_begin(), NumIterationsOffset)));
1009
7.20k
  }
1010
9.29k
  Expr *getPrevLowerBoundVariable() const {
1011
9.29k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1012
9.29k
           "expected loop bound sharing directive");
1013
9.29k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1014
9.29k
        *std::next(child_begin(), PrevLowerBoundVariableOffset)));
1015
9.29k
  }
1016
9.29k
  Expr *getPrevUpperBoundVariable() const {
1017
9.29k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1018
9.29k
           "expected loop bound sharing directive");
1019
9.29k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1020
9.29k
        *std::next(child_begin(), PrevUpperBoundVariableOffset)));
1021
9.29k
  }
1022
3.77k
  Expr *getDistInc() const {
1023
3.77k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1024
3.77k
           "expected loop bound sharing directive");
1025
3.77k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1026
3.77k
        *std::next(child_begin(), DistIncOffset)));
1027
3.77k
  }
1028
3.67k
  Expr *getPrevEnsureUpperBound() const {
1029
3.67k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1030
3.67k
           "expected loop bound sharing directive");
1031
3.67k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1032
3.67k
        *std::next(child_begin(), PrevEnsureUpperBoundOffset)));
1033
3.67k
  }
1034
5.54k
  Expr *getCombinedLowerBoundVariable() const {
1035
5.54k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1036
5.54k
           "expected loop bound sharing directive");
1037
5.54k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1038
5.54k
        *std::next(child_begin(), CombinedLowerBoundVariableOffset)));
1039
5.54k
  }
1040
5.54k
  Expr *getCombinedUpperBoundVariable() const {
1041
5.54k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1042
5.54k
           "expected loop bound sharing directive");
1043
5.54k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1044
5.54k
        *std::next(child_begin(), CombinedUpperBoundVariableOffset)));
1045
5.54k
  }
1046
4.01k
  Expr *getCombinedEnsureUpperBound() const {
1047
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1048
4.01k
           "expected loop bound sharing directive");
1049
4.01k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1050
4.01k
        *std::next(child_begin(), CombinedEnsureUpperBoundOffset)));
1051
4.01k
  }
1052
4.01k
  Expr *getCombinedInit() const {
1053
4.01k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1054
4.01k
           "expected loop bound sharing directive");
1055
4.01k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1056
4.01k
        *std::next(child_begin(), CombinedInitOffset)));
1057
4.01k
  }
1058
3.66k
  Expr *getCombinedCond() const {
1059
3.66k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1060
3.66k
           "expected loop bound sharing directive");
1061
3.66k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1062
3.66k
        *std::next(child_begin(), CombinedConditionOffset)));
1063
3.66k
  }
1064
2.14k
  Expr *getCombinedNextLowerBound() const {
1065
2.14k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1066
2.14k
           "expected loop bound sharing directive");
1067
2.14k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1068
2.14k
        *std::next(child_begin(), CombinedNextLowerBoundOffset)));
1069
2.14k
  }
1070
2.14k
  Expr *getCombinedNextUpperBound() const {
1071
2.14k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1072
2.14k
           "expected loop bound sharing directive");
1073
2.14k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1074
2.14k
        *std::next(child_begin(), CombinedNextUpperBoundOffset)));
1075
2.14k
  }
1076
2.14k
  Expr *getCombinedDistCond() const {
1077
2.14k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1078
2.14k
           "expected loop bound distribute sharing directive");
1079
2.14k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1080
2.14k
        *std::next(child_begin(), CombinedDistConditionOffset)));
1081
2.14k
  }
1082
1.91k
  Expr *getCombinedParForInDistCond() const {
1083
1.91k
    assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) &&
1084
1.91k
           "expected loop bound distribute sharing directive");
1085
1.91k
    return const_cast<Expr *>(reinterpret_cast<const Expr *>(
1086
1.91k
        *std::next(child_begin(), CombinedParForInDistConditionOffset)));
1087
1.91k
  }
1088
  /// Try to find the next loop sub-statement in the specified statement \p
1089
  /// CurStmt.
1090
  /// \param TryImperfectlyNestedLoops true, if we need to try to look for the
1091
  /// imperfectly nested loop.
1092
  static Stmt *tryToFindNextInnerLoop(Stmt *CurStmt,
1093
                                      bool TryImperfectlyNestedLoops);
1094
  static const Stmt *tryToFindNextInnerLoop(const Stmt *CurStmt,
1095
21.7k
                                            bool TryImperfectlyNestedLoops) {
1096
21.7k
    return tryToFindNextInnerLoop(const_cast<Stmt *>(CurStmt),
1097
21.7k
                                  TryImperfectlyNestedLoops);
1098
21.7k
  }
1099
  Stmt *getBody();
1100
110k
  const Stmt *getBody() const {
1101
110k
    return const_cast<OMPLoopDirective *>(this)->getBody();
1102
110k
  }
1103
1104
5.33k
  ArrayRef<Expr *> counters() { return getCounters(); }
1105
1106
44.7k
  ArrayRef<Expr *> counters() const {
1107
44.7k
    return const_cast<OMPLoopDirective *>(this)->getCounters();
1108
44.7k
  }
1109
1110
5.33k
  ArrayRef<Expr *> private_counters() { return getPrivateCounters(); }
1111
1112
18.2k
  ArrayRef<Expr *> private_counters() const {
1113
18.2k
    return const_cast<OMPLoopDirective *>(this)->getPrivateCounters();
1114
18.2k
  }
1115
1116
5.33k
  ArrayRef<Expr *> inits() { return getInits(); }
1117
1118
1.95k
  ArrayRef<Expr *> inits() const {
1119
1.95k
    return const_cast<OMPLoopDirective *>(this)->getInits();
1120
1.95k
  }
1121
1122
5.33k
  ArrayRef<Expr *> updates() { return getUpdates(); }
1123
1124
8.08k
  ArrayRef<Expr *> updates() const {
1125
8.08k
    return const_cast<OMPLoopDirective *>(this)->getUpdates();
1126
8.08k
  }
1127
1128
5.33k
  ArrayRef<Expr *> finals() { return getFinals(); }
1129
1130
6.98k
  ArrayRef<Expr *> finals() const {
1131
6.98k
    return const_cast<OMPLoopDirective *>(this)->getFinals();
1132
6.98k
  }
1133
1134
5.33k
  ArrayRef<Expr *> dependent_counters() { return getDependentCounters(); }
1135
1136
1.95k
  ArrayRef<Expr *> dependent_counters() const {
1137
1.95k
    return const_cast<OMPLoopDirective *>(this)->getDependentCounters();
1138
1.95k
  }
1139
1140
5.33k
  ArrayRef<Expr *> dependent_inits() { return getDependentInits(); }
1141
1142
1.95k
  ArrayRef<Expr *> dependent_inits() const {
1143
1.95k
    return const_cast<OMPLoopDirective *>(this)->getDependentInits();
1144
1.95k
  }
1145
1146
5.33k
  ArrayRef<Expr *> finals_conditions() { return getFinalsConditions(); }
1147
1148
8.08k
  ArrayRef<Expr *> finals_conditions() const {
1149
8.08k
    return const_cast<OMPLoopDirective *>(this)->getFinalsConditions();
1150
8.08k
  }
1151
1152
351k
  static bool classof(const Stmt *T) {
1153
351k
    return T->getStmtClass() == OMPSimdDirectiveClass ||
1154
351k
           
T->getStmtClass() == OMPForDirectiveClass341k
||
1155
351k
           
T->getStmtClass() == OMPForSimdDirectiveClass329k
||
1156
351k
           
T->getStmtClass() == OMPParallelForDirectiveClass319k
||
1157
351k
           
T->getStmtClass() == OMPParallelForSimdDirectiveClass311k
||
1158
351k
           
T->getStmtClass() == OMPTaskLoopDirectiveClass301k
||
1159
351k
           
T->getStmtClass() == OMPTaskLoopSimdDirectiveClass293k
||
1160
351k
           
T->getStmtClass() == OMPMasterTaskLoopDirectiveClass285k
||
1161
351k
           
T->getStmtClass() == OMPMasterTaskLoopSimdDirectiveClass280k
||
1162
351k
           
T->getStmtClass() == OMPParallelMasterTaskLoopDirectiveClass272k
||
1163
351k
           
T->getStmtClass() == OMPParallelMasterTaskLoopSimdDirectiveClass268k
||
1164
351k
           
T->getStmtClass() == OMPDistributeDirectiveClass262k
||
1165
351k
           
T->getStmtClass() == OMPTargetParallelForDirectiveClass258k
||
1166
351k
           
T->getStmtClass() == OMPDistributeParallelForDirectiveClass247k
||
1167
351k
           
T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass238k
||
1168
351k
           
T->getStmtClass() == OMPDistributeSimdDirectiveClass227k
||
1169
351k
           
T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass219k
||
1170
351k
           
T->getStmtClass() == OMPTargetSimdDirectiveClass207k
||
1171
351k
           
T->getStmtClass() == OMPTeamsDistributeDirectiveClass194k
||
1172
351k
           
T->getStmtClass() == OMPTeamsDistributeSimdDirectiveClass187k
||
1173
351k
           T->getStmtClass() ==
1174
179k
               OMPTeamsDistributeParallelForSimdDirectiveClass ||
1175
351k
           
T->getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass168k
||
1176
351k
           T->getStmtClass() ==
1177
160k
               OMPTargetTeamsDistributeParallelForDirectiveClass ||
1178
351k
           T->getStmtClass() ==
1179
148k
               OMPTargetTeamsDistributeParallelForSimdDirectiveClass ||
1180
351k
           
T->getStmtClass() == OMPTargetTeamsDistributeDirectiveClass132k
||
1181
351k
           
T->getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass122k
;
1182
351k
  }
1183
};
1184
1185
/// This represents '#pragma omp simd' directive.
1186
///
1187
/// \code
1188
/// #pragma omp simd private(a,b) linear(i,j:s) reduction(+:c,d)
1189
/// \endcode
1190
/// In this example directive '#pragma omp simd' has clauses 'private'
1191
/// with the variables 'a' and 'b', 'linear' with variables 'i', 'j' and
1192
/// linear step 's', 'reduction' with operator '+' and variables 'c' and 'd'.
1193
///
1194
class OMPSimdDirective : public OMPLoopDirective {
1195
  friend class ASTStmtReader;
1196
  /// Build directive with the given start and end location.
1197
  ///
1198
  /// \param StartLoc Starting location of the directive kind.
1199
  /// \param EndLoc Ending location of the directive.
1200
  /// \param CollapsedNum Number of collapsed nested loops.
1201
  /// \param NumClauses Number of clauses.
1202
  ///
1203
  OMPSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1204
                   unsigned CollapsedNum, unsigned NumClauses)
1205
      : OMPLoopDirective(this, OMPSimdDirectiveClass, llvm::omp::OMPD_simd,
1206
4.98k
                         StartLoc, EndLoc, CollapsedNum, NumClauses) {}
1207
1208
  /// Build an empty directive.
1209
  ///
1210
  /// \param CollapsedNum Number of collapsed nested loops.
1211
  /// \param NumClauses Number of clauses.
1212
  ///
1213
  explicit OMPSimdDirective(unsigned CollapsedNum, unsigned NumClauses)
1214
      : OMPLoopDirective(this, OMPSimdDirectiveClass, llvm::omp::OMPD_simd,
1215
                         SourceLocation(), SourceLocation(), CollapsedNum,
1216
154
                         NumClauses) {}
1217
1218
public:
1219
  /// Creates directive with a list of \a Clauses.
1220
  ///
1221
  /// \param C AST context.
1222
  /// \param StartLoc Starting location of the directive kind.
1223
  /// \param EndLoc Ending Location of the directive.
1224
  /// \param CollapsedNum Number of collapsed loops.
1225
  /// \param Clauses List of clauses.
1226
  /// \param AssociatedStmt Statement, associated with the directive.
1227
  /// \param Exprs Helper expressions for CodeGen.
1228
  ///
1229
  static OMPSimdDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1230
                                  SourceLocation EndLoc, unsigned CollapsedNum,
1231
                                  ArrayRef<OMPClause *> Clauses,
1232
                                  Stmt *AssociatedStmt,
1233
                                  const HelperExprs &Exprs);
1234
1235
  /// Creates an empty directive with the place
1236
  /// for \a NumClauses clauses.
1237
  ///
1238
  /// \param C AST context.
1239
  /// \param CollapsedNum Number of collapsed nested loops.
1240
  /// \param NumClauses Number of clauses.
1241
  ///
1242
  static OMPSimdDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
1243
                                       unsigned CollapsedNum, EmptyShell);
1244
1245
1.84k
  static bool classof(const Stmt *T) {
1246
1.84k
    return T->getStmtClass() == OMPSimdDirectiveClass;
1247
1.84k
  }
1248
};
1249
1250
/// This represents '#pragma omp for' directive.
1251
///
1252
/// \code
1253
/// #pragma omp for private(a,b) reduction(+:c,d)
1254
/// \endcode
1255
/// In this example directive '#pragma omp for' has clauses 'private' with the
1256
/// variables 'a' and 'b' and 'reduction' with operator '+' and variables 'c'
1257
/// and 'd'.
1258
///
1259
class OMPForDirective : public OMPLoopDirective {
1260
  friend class ASTStmtReader;
1261
1262
  /// true if current directive has inner cancel directive.
1263
  bool HasCancel;
1264
1265
  /// Build directive with the given start and end location.
1266
  ///
1267
  /// \param StartLoc Starting location of the directive kind.
1268
  /// \param EndLoc Ending location of the directive.
1269
  /// \param CollapsedNum Number of collapsed nested loops.
1270
  /// \param NumClauses Number of clauses.
1271
  ///
1272
  OMPForDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1273
                  unsigned CollapsedNum, unsigned NumClauses)
1274
      : OMPLoopDirective(this, OMPForDirectiveClass, llvm::omp::OMPD_for,
1275
                         StartLoc, EndLoc, CollapsedNum, NumClauses),
1276
5.07k
        HasCancel(false) {}
1277
1278
  /// Build an empty directive.
1279
  ///
1280
  /// \param CollapsedNum Number of collapsed nested loops.
1281
  /// \param NumClauses Number of clauses.
1282
  ///
1283
  explicit OMPForDirective(unsigned CollapsedNum, unsigned NumClauses)
1284
      : OMPLoopDirective(this, OMPForDirectiveClass, llvm::omp::OMPD_for,
1285
                         SourceLocation(), SourceLocation(), CollapsedNum,
1286
                         NumClauses),
1287
260
        HasCancel(false) {}
1288
1289
  /// Set cancel state.
1290
5.33k
  void setHasCancel(bool Has) { HasCancel = Has; }
1291
1292
public:
1293
  /// Creates directive with a list of \a Clauses.
1294
  ///
1295
  /// \param C AST context.
1296
  /// \param StartLoc Starting location of the directive kind.
1297
  /// \param EndLoc Ending Location of the directive.
1298
  /// \param CollapsedNum Number of collapsed loops.
1299
  /// \param Clauses List of clauses.
1300
  /// \param AssociatedStmt Statement, associated with the directive.
1301
  /// \param Exprs Helper expressions for CodeGen.
1302
  /// \param HasCancel true if current directive has inner cancel directive.
1303
  ///
1304
  static OMPForDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1305
                                 SourceLocation EndLoc, unsigned CollapsedNum,
1306
                                 ArrayRef<OMPClause *> Clauses,
1307
                                 Stmt *AssociatedStmt, const HelperExprs &Exprs,
1308
                                 bool HasCancel);
1309
1310
  /// Creates an empty directive with the place
1311
  /// for \a NumClauses clauses.
1312
  ///
1313
  /// \param C AST context.
1314
  /// \param CollapsedNum Number of collapsed nested loops.
1315
  /// \param NumClauses Number of clauses.
1316
  ///
1317
  static OMPForDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
1318
                                      unsigned CollapsedNum, EmptyShell);
1319
1320
  /// Return true if current directive has inner cancel directive.
1321
822
  bool hasCancel() const { return HasCancel; }
1322
1323
2.21k
  static bool classof(const Stmt *T) {
1324
2.21k
    return T->getStmtClass() == OMPForDirectiveClass;
1325
2.21k
  }
1326
};
1327
1328
/// This represents '#pragma omp for simd' directive.
1329
///
1330
/// \code
1331
/// #pragma omp for simd private(a,b) linear(i,j:s) reduction(+:c,d)
1332
/// \endcode
1333
/// In this example directive '#pragma omp for simd' has clauses 'private'
1334
/// with the variables 'a' and 'b', 'linear' with variables 'i', 'j' and
1335
/// linear step 's', 'reduction' with operator '+' and variables 'c' and 'd'.
1336
///
1337
class OMPForSimdDirective : public OMPLoopDirective {
1338
  friend class ASTStmtReader;
1339
  /// Build directive with the given start and end location.
1340
  ///
1341
  /// \param StartLoc Starting location of the directive kind.
1342
  /// \param EndLoc Ending location of the directive.
1343
  /// \param CollapsedNum Number of collapsed nested loops.
1344
  /// \param NumClauses Number of clauses.
1345
  ///
1346
  OMPForSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1347
                      unsigned CollapsedNum, unsigned NumClauses)
1348
      : OMPLoopDirective(this, OMPForSimdDirectiveClass,
1349
                         llvm::omp::OMPD_for_simd, StartLoc, EndLoc,
1350
4.60k
                         CollapsedNum, NumClauses) {}
1351
1352
  /// Build an empty directive.
1353
  ///
1354
  /// \param CollapsedNum Number of collapsed nested loops.
1355
  /// \param NumClauses Number of clauses.
1356
  ///
1357
  explicit OMPForSimdDirective(unsigned CollapsedNum, unsigned NumClauses)
1358
      : OMPLoopDirective(this, OMPForSimdDirectiveClass,
1359
                         llvm::omp::OMPD_for_simd, SourceLocation(),
1360
102
                         SourceLocation(), CollapsedNum, NumClauses) {}
1361
1362
public:
1363
  /// Creates directive with a list of \a Clauses.
1364
  ///
1365
  /// \param C AST context.
1366
  /// \param StartLoc Starting location of the directive kind.
1367
  /// \param EndLoc Ending Location of the directive.
1368
  /// \param CollapsedNum Number of collapsed loops.
1369
  /// \param Clauses List of clauses.
1370
  /// \param AssociatedStmt Statement, associated with the directive.
1371
  /// \param Exprs Helper expressions for CodeGen.
1372
  ///
1373
  static OMPForSimdDirective *
1374
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1375
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1376
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
1377
1378
  /// Creates an empty directive with the place
1379
  /// for \a NumClauses clauses.
1380
  ///
1381
  /// \param C AST context.
1382
  /// \param CollapsedNum Number of collapsed nested loops.
1383
  /// \param NumClauses Number of clauses.
1384
  ///
1385
  static OMPForSimdDirective *CreateEmpty(const ASTContext &C,
1386
                                          unsigned NumClauses,
1387
                                          unsigned CollapsedNum, EmptyShell);
1388
1389
1.82k
  static bool classof(const Stmt *T) {
1390
1.82k
    return T->getStmtClass() == OMPForSimdDirectiveClass;
1391
1.82k
  }
1392
};
1393
1394
/// This represents '#pragma omp sections' directive.
1395
///
1396
/// \code
1397
/// #pragma omp sections private(a,b) reduction(+:c,d)
1398
/// \endcode
1399
/// In this example directive '#pragma omp sections' has clauses 'private' with
1400
/// the variables 'a' and 'b' and 'reduction' with operator '+' and variables
1401
/// 'c' and 'd'.
1402
///
1403
class OMPSectionsDirective : public OMPExecutableDirective {
1404
  friend class ASTStmtReader;
1405
1406
  /// true if current directive has inner cancel directive.
1407
  bool HasCancel;
1408
1409
  /// Build directive with the given start and end location.
1410
  ///
1411
  /// \param StartLoc Starting location of the directive kind.
1412
  /// \param EndLoc Ending location of the directive.
1413
  /// \param NumClauses Number of clauses.
1414
  ///
1415
  OMPSectionsDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1416
                       unsigned NumClauses)
1417
      : OMPExecutableDirective(this, OMPSectionsDirectiveClass,
1418
                               llvm::omp::OMPD_sections, StartLoc, EndLoc,
1419
                               NumClauses, 1),
1420
2.79k
        HasCancel(false) {}
1421
1422
  /// Build an empty directive.
1423
  ///
1424
  /// \param NumClauses Number of clauses.
1425
  ///
1426
  explicit OMPSectionsDirective(unsigned NumClauses)
1427
      : OMPExecutableDirective(this, OMPSectionsDirectiveClass,
1428
                               llvm::omp::OMPD_sections, SourceLocation(),
1429
                               SourceLocation(), NumClauses, 1),
1430
48
        HasCancel(false) {}
1431
1432
  /// Set cancel state.
1433
2.84k
  void setHasCancel(bool Has) { HasCancel = Has; }
1434
1435
public:
1436
  /// Creates directive with a list of \a Clauses.
1437
  ///
1438
  /// \param C AST context.
1439
  /// \param StartLoc Starting location of the directive kind.
1440
  /// \param EndLoc Ending Location of the directive.
1441
  /// \param Clauses List of clauses.
1442
  /// \param AssociatedStmt Statement, associated with the directive.
1443
  /// \param HasCancel true if current directive has inner directive.
1444
  ///
1445
  static OMPSectionsDirective *
1446
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1447
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel);
1448
1449
  /// Creates an empty directive with the place for \a NumClauses
1450
  /// clauses.
1451
  ///
1452
  /// \param C AST context.
1453
  /// \param NumClauses Number of clauses.
1454
  ///
1455
  static OMPSectionsDirective *CreateEmpty(const ASTContext &C,
1456
                                           unsigned NumClauses, EmptyShell);
1457
1458
  /// Return true if current directive has inner cancel directive.
1459
100
  bool hasCancel() const { return HasCancel; }
1460
1461
1.20k
  static bool classof(const Stmt *T) {
1462
1.20k
    return T->getStmtClass() == OMPSectionsDirectiveClass;
1463
1.20k
  }
1464
};
1465
1466
/// This represents '#pragma omp section' directive.
1467
///
1468
/// \code
1469
/// #pragma omp section
1470
/// \endcode
1471
///
1472
class OMPSectionDirective : public OMPExecutableDirective {
1473
  friend class ASTStmtReader;
1474
1475
  /// true if current directive has inner cancel directive.
1476
  bool HasCancel;
1477
1478
  /// Build directive with the given start and end location.
1479
  ///
1480
  /// \param StartLoc Starting location of the directive kind.
1481
  /// \param EndLoc Ending location of the directive.
1482
  ///
1483
  OMPSectionDirective(SourceLocation StartLoc, SourceLocation EndLoc)
1484
      : OMPExecutableDirective(this, OMPSectionDirectiveClass,
1485
                               llvm::omp::OMPD_section, StartLoc, EndLoc, 0, 1),
1486
823
        HasCancel(false) {}
1487
1488
  /// Build an empty directive.
1489
  ///
1490
  explicit OMPSectionDirective()
1491
      : OMPExecutableDirective(this, OMPSectionDirectiveClass,
1492
                               llvm::omp::OMPD_section, SourceLocation(),
1493
                               SourceLocation(), 0, 1),
1494
44
        HasCancel(false) {}
1495
1496
public:
1497
  /// Creates directive.
1498
  ///
1499
  /// \param C AST context.
1500
  /// \param StartLoc Starting location of the directive kind.
1501
  /// \param EndLoc Ending Location of the directive.
1502
  /// \param AssociatedStmt Statement, associated with the directive.
1503
  /// \param HasCancel true if current directive has inner directive.
1504
  ///
1505
  static OMPSectionDirective *Create(const ASTContext &C,
1506
                                     SourceLocation StartLoc,
1507
                                     SourceLocation EndLoc,
1508
                                     Stmt *AssociatedStmt, bool HasCancel);
1509
1510
  /// Creates an empty directive.
1511
  ///
1512
  /// \param C AST context.
1513
  ///
1514
  static OMPSectionDirective *CreateEmpty(const ASTContext &C, EmptyShell);
1515
1516
  /// Set cancel state.
1517
1.02k
  void setHasCancel(bool Has) { HasCancel = Has; }
1518
1519
  /// Return true if current directive has inner cancel directive.
1520
90
  bool hasCancel() const { return HasCancel; }
1521
1522
614
  static bool classof(const Stmt *T) {
1523
614
    return T->getStmtClass() == OMPSectionDirectiveClass;
1524
614
  }
1525
};
1526
1527
/// This represents '#pragma omp single' directive.
1528
///
1529
/// \code
1530
/// #pragma omp single private(a,b) copyprivate(c,d)
1531
/// \endcode
1532
/// In this example directive '#pragma omp single' has clauses 'private' with
1533
/// the variables 'a' and 'b' and 'copyprivate' with variables 'c' and 'd'.
1534
///
1535
class OMPSingleDirective : public OMPExecutableDirective {
1536
  friend class ASTStmtReader;
1537
  /// Build directive with the given start and end location.
1538
  ///
1539
  /// \param StartLoc Starting location of the directive kind.
1540
  /// \param EndLoc Ending location of the directive.
1541
  /// \param NumClauses Number of clauses.
1542
  ///
1543
  OMPSingleDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1544
                     unsigned NumClauses)
1545
      : OMPExecutableDirective(this, OMPSingleDirectiveClass,
1546
                               llvm::omp::OMPD_single, StartLoc, EndLoc,
1547
1.75k
                               NumClauses, 1) {}
1548
1549
  /// Build an empty directive.
1550
  ///
1551
  /// \param NumClauses Number of clauses.
1552
  ///
1553
  explicit OMPSingleDirective(unsigned NumClauses)
1554
      : OMPExecutableDirective(this, OMPSingleDirectiveClass,
1555
                               llvm::omp::OMPD_single, SourceLocation(),
1556
36
                               SourceLocation(), NumClauses, 1) {}
1557
1558
public:
1559
  /// Creates directive with a list of \a Clauses.
1560
  ///
1561
  /// \param C AST context.
1562
  /// \param StartLoc Starting location of the directive kind.
1563
  /// \param EndLoc Ending Location of the directive.
1564
  /// \param Clauses List of clauses.
1565
  /// \param AssociatedStmt Statement, associated with the directive.
1566
  ///
1567
  static OMPSingleDirective *
1568
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1569
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
1570
1571
  /// Creates an empty directive with the place for \a NumClauses
1572
  /// clauses.
1573
  ///
1574
  /// \param C AST context.
1575
  /// \param NumClauses Number of clauses.
1576
  ///
1577
  static OMPSingleDirective *CreateEmpty(const ASTContext &C,
1578
                                         unsigned NumClauses, EmptyShell);
1579
1580
583
  static bool classof(const Stmt *T) {
1581
583
    return T->getStmtClass() == OMPSingleDirectiveClass;
1582
583
  }
1583
};
1584
1585
/// This represents '#pragma omp master' directive.
1586
///
1587
/// \code
1588
/// #pragma omp master
1589
/// \endcode
1590
///
1591
class OMPMasterDirective : public OMPExecutableDirective {
1592
  friend class ASTStmtReader;
1593
  /// Build directive with the given start and end location.
1594
  ///
1595
  /// \param StartLoc Starting location of the directive kind.
1596
  /// \param EndLoc Ending location of the directive.
1597
  ///
1598
  OMPMasterDirective(SourceLocation StartLoc, SourceLocation EndLoc)
1599
      : OMPExecutableDirective(this, OMPMasterDirectiveClass,
1600
1.05k
                               llvm::omp::OMPD_master, StartLoc, EndLoc, 0, 1) {
1601
1.05k
  }
1602
1603
  /// Build an empty directive.
1604
  ///
1605
  explicit OMPMasterDirective()
1606
      : OMPExecutableDirective(this, OMPMasterDirectiveClass,
1607
                               llvm::omp::OMPD_master, SourceLocation(),
1608
11
                               SourceLocation(), 0, 1) {}
1609
1610
public:
1611
  /// Creates directive.
1612
  ///
1613
  /// \param C AST context.
1614
  /// \param StartLoc Starting location of the directive kind.
1615
  /// \param EndLoc Ending Location of the directive.
1616
  /// \param AssociatedStmt Statement, associated with the directive.
1617
  ///
1618
  static OMPMasterDirective *Create(const ASTContext &C,
1619
                                    SourceLocation StartLoc,
1620
                                    SourceLocation EndLoc,
1621
                                    Stmt *AssociatedStmt);
1622
1623
  /// Creates an empty directive.
1624
  ///
1625
  /// \param C AST context.
1626
  ///
1627
  static OMPMasterDirective *CreateEmpty(const ASTContext &C, EmptyShell);
1628
1629
357
  static bool classof(const Stmt *T) {
1630
357
    return T->getStmtClass() == OMPMasterDirectiveClass;
1631
357
  }
1632
};
1633
1634
/// This represents '#pragma omp critical' directive.
1635
///
1636
/// \code
1637
/// #pragma omp critical
1638
/// \endcode
1639
///
1640
class OMPCriticalDirective : public OMPExecutableDirective {
1641
  friend class ASTStmtReader;
1642
  /// Name of the directive.
1643
  DeclarationNameInfo DirName;
1644
  /// Build directive with the given start and end location.
1645
  ///
1646
  /// \param Name Name of the directive.
1647
  /// \param StartLoc Starting location of the directive kind.
1648
  /// \param EndLoc Ending location of the directive.
1649
  /// \param NumClauses Number of clauses.
1650
  ///
1651
  OMPCriticalDirective(const DeclarationNameInfo &Name, SourceLocation StartLoc,
1652
                       SourceLocation EndLoc, unsigned NumClauses)
1653
      : OMPExecutableDirective(this, OMPCriticalDirectiveClass,
1654
                               llvm::omp::OMPD_critical, StartLoc, EndLoc,
1655
                               NumClauses, 1),
1656
1.50k
        DirName(Name) {}
1657
1658
  /// Build an empty directive.
1659
  ///
1660
  /// \param NumClauses Number of clauses.
1661
  ///
1662
  explicit OMPCriticalDirective(unsigned NumClauses)
1663
      : OMPExecutableDirective(this, OMPCriticalDirectiveClass,
1664
                               llvm::omp::OMPD_critical, SourceLocation(),
1665
                               SourceLocation(), NumClauses, 1),
1666
31
        DirName() {}
1667
1668
  /// Set name of the directive.
1669
  ///
1670
  /// \param Name Name of the directive.
1671
  ///
1672
0
  void setDirectiveName(const DeclarationNameInfo &Name) { DirName = Name; }
1673
1674
public:
1675
  /// Creates directive.
1676
  ///
1677
  /// \param C AST context.
1678
  /// \param Name Name of the directive.
1679
  /// \param StartLoc Starting location of the directive kind.
1680
  /// \param EndLoc Ending Location of the directive.
1681
  /// \param Clauses List of clauses.
1682
  /// \param AssociatedStmt Statement, associated with the directive.
1683
  ///
1684
  static OMPCriticalDirective *
1685
  Create(const ASTContext &C, const DeclarationNameInfo &Name,
1686
         SourceLocation StartLoc, SourceLocation EndLoc,
1687
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
1688
1689
  /// Creates an empty directive.
1690
  ///
1691
  /// \param C AST context.
1692
  /// \param NumClauses Number of clauses.
1693
  ///
1694
  static OMPCriticalDirective *CreateEmpty(const ASTContext &C,
1695
                                           unsigned NumClauses, EmptyShell);
1696
1697
  /// Return name of the directive.
1698
  ///
1699
1.20k
  DeclarationNameInfo getDirectiveName() const { return DirName; }
1700
1701
1.03k
  static bool classof(const Stmt *T) {
1702
1.03k
    return T->getStmtClass() == OMPCriticalDirectiveClass;
1703
1.03k
  }
1704
};
1705
1706
/// This represents '#pragma omp parallel for' directive.
1707
///
1708
/// \code
1709
/// #pragma omp parallel for private(a,b) reduction(+:c,d)
1710
/// \endcode
1711
/// In this example directive '#pragma omp parallel for' has clauses 'private'
1712
/// with the variables 'a' and 'b' and 'reduction' with operator '+' and
1713
/// variables 'c' and 'd'.
1714
///
1715
class OMPParallelForDirective : public OMPLoopDirective {
1716
  friend class ASTStmtReader;
1717
1718
  /// true if current region has inner cancel directive.
1719
  bool HasCancel;
1720
1721
  /// Build directive with the given start and end location.
1722
  ///
1723
  /// \param StartLoc Starting location of the directive kind.
1724
  /// \param EndLoc Ending location of the directive.
1725
  /// \param CollapsedNum Number of collapsed nested loops.
1726
  /// \param NumClauses Number of clauses.
1727
  ///
1728
  OMPParallelForDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1729
                          unsigned CollapsedNum, unsigned NumClauses)
1730
      : OMPLoopDirective(this, OMPParallelForDirectiveClass,
1731
                         llvm::omp::OMPD_parallel_for, StartLoc, EndLoc,
1732
                         CollapsedNum, NumClauses),
1733
4.05k
        HasCancel(false) {}
1734
1735
  /// Build an empty directive.
1736
  ///
1737
  /// \param CollapsedNum Number of collapsed nested loops.
1738
  /// \param NumClauses Number of clauses.
1739
  ///
1740
  explicit OMPParallelForDirective(unsigned CollapsedNum, unsigned NumClauses)
1741
      : OMPLoopDirective(this, OMPParallelForDirectiveClass,
1742
                         llvm::omp::OMPD_parallel_for, SourceLocation(),
1743
                         SourceLocation(), CollapsedNum, NumClauses),
1744
69
        HasCancel(false) {}
1745
1746
  /// Set cancel state.
1747
4.12k
  void setHasCancel(bool Has) { HasCancel = Has; }
1748
1749
public:
1750
  /// Creates directive with a list of \a Clauses.
1751
  ///
1752
  /// \param C AST context.
1753
  /// \param StartLoc Starting location of the directive kind.
1754
  /// \param EndLoc Ending Location of the directive.
1755
  /// \param CollapsedNum Number of collapsed loops.
1756
  /// \param Clauses List of clauses.
1757
  /// \param AssociatedStmt Statement, associated with the directive.
1758
  /// \param Exprs Helper expressions for CodeGen.
1759
  /// \param HasCancel true if current directive has inner cancel directive.
1760
  ///
1761
  static OMPParallelForDirective *
1762
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1763
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1764
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
1765
1766
  /// Creates an empty directive with the place
1767
  /// for \a NumClauses clauses.
1768
  ///
1769
  /// \param C AST context.
1770
  /// \param CollapsedNum Number of collapsed nested loops.
1771
  /// \param NumClauses Number of clauses.
1772
  ///
1773
  static OMPParallelForDirective *CreateEmpty(const ASTContext &C,
1774
                                              unsigned NumClauses,
1775
                                              unsigned CollapsedNum,
1776
                                              EmptyShell);
1777
1778
  /// Return true if current directive has inner cancel directive.
1779
363
  bool hasCancel() const { return HasCancel; }
1780
1781
9.11k
  static bool classof(const Stmt *T) {
1782
9.11k
    return T->getStmtClass() == OMPParallelForDirectiveClass;
1783
9.11k
  }
1784
};
1785
1786
/// This represents '#pragma omp parallel for simd' directive.
1787
///
1788
/// \code
1789
/// #pragma omp parallel for simd private(a,b) linear(i,j:s) reduction(+:c,d)
1790
/// \endcode
1791
/// In this example directive '#pragma omp parallel for simd' has clauses
1792
/// 'private' with the variables 'a' and 'b', 'linear' with variables 'i', 'j'
1793
/// and linear step 's', 'reduction' with operator '+' and variables 'c' and
1794
/// 'd'.
1795
///
1796
class OMPParallelForSimdDirective : public OMPLoopDirective {
1797
  friend class ASTStmtReader;
1798
  /// Build directive with the given start and end location.
1799
  ///
1800
  /// \param StartLoc Starting location of the directive kind.
1801
  /// \param EndLoc Ending location of the directive.
1802
  /// \param CollapsedNum Number of collapsed nested loops.
1803
  /// \param NumClauses Number of clauses.
1804
  ///
1805
  OMPParallelForSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1806
                              unsigned CollapsedNum, unsigned NumClauses)
1807
      : OMPLoopDirective(this, OMPParallelForSimdDirectiveClass,
1808
                         llvm::omp::OMPD_parallel_for_simd, StartLoc, EndLoc,
1809
4.94k
                         CollapsedNum, NumClauses) {}
1810
1811
  /// Build an empty directive.
1812
  ///
1813
  /// \param CollapsedNum Number of collapsed nested loops.
1814
  /// \param NumClauses Number of clauses.
1815
  ///
1816
  explicit OMPParallelForSimdDirective(unsigned CollapsedNum,
1817
                                       unsigned NumClauses)
1818
      : OMPLoopDirective(this, OMPParallelForSimdDirectiveClass,
1819
                         llvm::omp::OMPD_parallel_for_simd, SourceLocation(),
1820
104
                         SourceLocation(), CollapsedNum, NumClauses) {}
1821
1822
public:
1823
  /// Creates directive with a list of \a Clauses.
1824
  ///
1825
  /// \param C AST context.
1826
  /// \param StartLoc Starting location of the directive kind.
1827
  /// \param EndLoc Ending Location of the directive.
1828
  /// \param CollapsedNum Number of collapsed loops.
1829
  /// \param Clauses List of clauses.
1830
  /// \param AssociatedStmt Statement, associated with the directive.
1831
  /// \param Exprs Helper expressions for CodeGen.
1832
  ///
1833
  static OMPParallelForSimdDirective *
1834
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1835
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1836
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
1837
1838
  /// Creates an empty directive with the place
1839
  /// for \a NumClauses clauses.
1840
  ///
1841
  /// \param C AST context.
1842
  /// \param CollapsedNum Number of collapsed nested loops.
1843
  /// \param NumClauses Number of clauses.
1844
  ///
1845
  static OMPParallelForSimdDirective *CreateEmpty(const ASTContext &C,
1846
                                                  unsigned NumClauses,
1847
                                                  unsigned CollapsedNum,
1848
                                                  EmptyShell);
1849
1850
1.76k
  static bool classof(const Stmt *T) {
1851
1.76k
    return T->getStmtClass() == OMPParallelForSimdDirectiveClass;
1852
1.76k
  }
1853
};
1854
1855
/// This represents '#pragma omp parallel master' directive.
1856
///
1857
/// \code
1858
/// #pragma omp parallel master private(a,b)
1859
/// \endcode
1860
/// In this example directive '#pragma omp parallel master' has clauses
1861
/// 'private' with the variables 'a' and 'b'
1862
///
1863
class OMPParallelMasterDirective : public OMPExecutableDirective {
1864
  friend class ASTStmtReader;
1865
1866
  OMPParallelMasterDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1867
                             unsigned NumClauses)
1868
      : OMPExecutableDirective(this, OMPParallelMasterDirectiveClass,
1869
                               llvm::omp::OMPD_parallel_master, StartLoc,
1870
2.03k
                               EndLoc, NumClauses, 1) {}
1871
1872
  explicit OMPParallelMasterDirective(unsigned NumClauses)
1873
      : OMPExecutableDirective(this, OMPParallelMasterDirectiveClass,
1874
                               llvm::omp::OMPD_parallel_master,
1875
                               SourceLocation(), SourceLocation(), NumClauses,
1876
68
                               1) {}
1877
1878
public:
1879
  /// Creates directive with a list of \a Clauses.
1880
  ///
1881
  /// \param C AST context.
1882
  /// \param StartLoc Starting location of the directive kind.
1883
  /// \param EndLoc Ending Location of the directive.
1884
  /// \param Clauses List of clauses.
1885
  /// \param AssociatedStmt Statement, associated with the directive.
1886
  ///
1887
  static OMPParallelMasterDirective *
1888
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1889
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
1890
1891
  /// Creates an empty directive with the place for \a NumClauses
1892
  /// clauses.
1893
  ///
1894
  /// \param C AST context.
1895
  /// \param NumClauses Number of clauses.
1896
  ///
1897
  static OMPParallelMasterDirective *
1898
  CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
1899
1900
900
  static bool classof(const Stmt *T) {
1901
900
    return T->getStmtClass() == OMPParallelMasterDirectiveClass;
1902
900
  }
1903
};
1904
1905
/// This represents '#pragma omp parallel sections' directive.
1906
///
1907
/// \code
1908
/// #pragma omp parallel sections private(a,b) reduction(+:c,d)
1909
/// \endcode
1910
/// In this example directive '#pragma omp parallel sections' has clauses
1911
/// 'private' with the variables 'a' and 'b' and 'reduction' with operator '+'
1912
/// and variables 'c' and 'd'.
1913
///
1914
class OMPParallelSectionsDirective : public OMPExecutableDirective {
1915
  friend class ASTStmtReader;
1916
1917
  /// true if current directive has inner cancel directive.
1918
  bool HasCancel;
1919
1920
  /// Build directive with the given start and end location.
1921
  ///
1922
  /// \param StartLoc Starting location of the directive kind.
1923
  /// \param EndLoc Ending location of the directive.
1924
  /// \param NumClauses Number of clauses.
1925
  ///
1926
  OMPParallelSectionsDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1927
                               unsigned NumClauses)
1928
      : OMPExecutableDirective(this, OMPParallelSectionsDirectiveClass,
1929
                               llvm::omp::OMPD_parallel_sections, StartLoc,
1930
                               EndLoc, NumClauses, 1),
1931
2.53k
        HasCancel(false) {}
1932
1933
  /// Build an empty directive.
1934
  ///
1935
  /// \param NumClauses Number of clauses.
1936
  ///
1937
  explicit OMPParallelSectionsDirective(unsigned NumClauses)
1938
      : OMPExecutableDirective(this, OMPParallelSectionsDirectiveClass,
1939
                               llvm::omp::OMPD_parallel_sections,
1940
                               SourceLocation(), SourceLocation(), NumClauses,
1941
                               1),
1942
24
        HasCancel(false) {}
1943
1944
  /// Set cancel state.
1945
2.55k
  void setHasCancel(bool Has) { HasCancel = Has; }
1946
1947
public:
1948
  /// Creates directive with a list of \a Clauses.
1949
  ///
1950
  /// \param C AST context.
1951
  /// \param StartLoc Starting location of the directive kind.
1952
  /// \param EndLoc Ending Location of the directive.
1953
  /// \param Clauses List of clauses.
1954
  /// \param AssociatedStmt Statement, associated with the directive.
1955
  /// \param HasCancel true if current directive has inner cancel directive.
1956
  ///
1957
  static OMPParallelSectionsDirective *
1958
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1959
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel);
1960
1961
  /// Creates an empty directive with the place for \a NumClauses
1962
  /// clauses.
1963
  ///
1964
  /// \param C AST context.
1965
  /// \param NumClauses Number of clauses.
1966
  ///
1967
  static OMPParallelSectionsDirective *
1968
  CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
1969
1970
  /// Return true if current directive has inner cancel directive.
1971
56
  bool hasCancel() const { return HasCancel; }
1972
1973
8.29k
  static bool classof(const Stmt *T) {
1974
8.29k
    return T->getStmtClass() == OMPParallelSectionsDirectiveClass;
1975
8.29k
  }
1976
};
1977
1978
/// This represents '#pragma omp task' directive.
1979
///
1980
/// \code
1981
/// #pragma omp task private(a,b) final(d)
1982
/// \endcode
1983
/// In this example directive '#pragma omp task' has clauses 'private' with the
1984
/// variables 'a' and 'b' and 'final' with condition 'd'.
1985
///
1986
class OMPTaskDirective : public OMPExecutableDirective {
1987
  friend class ASTStmtReader;
1988
  /// true if this directive has inner cancel directive.
1989
  bool HasCancel;
1990
1991
  /// Build directive with the given start and end location.
1992
  ///
1993
  /// \param StartLoc Starting location of the directive kind.
1994
  /// \param EndLoc Ending location of the directive.
1995
  /// \param NumClauses Number of clauses.
1996
  ///
1997
  OMPTaskDirective(SourceLocation StartLoc, SourceLocation EndLoc,
1998
                   unsigned NumClauses)
1999
      : OMPExecutableDirective(this, OMPTaskDirectiveClass,
2000
                               llvm::omp::OMPD_task, StartLoc, EndLoc,
2001
                               NumClauses, 1),
2002
2.57k
        HasCancel(false) {}
2003
2004
  /// Build an empty directive.
2005
  ///
2006
  /// \param NumClauses Number of clauses.
2007
  ///
2008
  explicit OMPTaskDirective(unsigned NumClauses)
2009
      : OMPExecutableDirective(this, OMPTaskDirectiveClass,
2010
                               llvm::omp::OMPD_task, SourceLocation(),
2011
                               SourceLocation(), NumClauses, 1),
2012
123
        HasCancel(false) {}
2013
2014
  /// Set cancel state.
2015
2.69k
  void setHasCancel(bool Has) { HasCancel = Has; }
2016
2017
public:
2018
  /// Creates directive with a list of \a Clauses.
2019
  ///
2020
  /// \param C AST context.
2021
  /// \param StartLoc Starting location of the directive kind.
2022
  /// \param EndLoc Ending Location of the directive.
2023
  /// \param Clauses List of clauses.
2024
  /// \param AssociatedStmt Statement, associated with the directive.
2025
  /// \param HasCancel true, if current directive has inner cancel directive.
2026
  ///
2027
  static OMPTaskDirective *Create(const ASTContext &C, SourceLocation StartLoc,
2028
                                  SourceLocation EndLoc,
2029
                                  ArrayRef<OMPClause *> Clauses,
2030
                                  Stmt *AssociatedStmt, bool HasCancel);
2031
2032
  /// Creates an empty directive with the place for \a NumClauses
2033
  /// clauses.
2034
  ///
2035
  /// \param C AST context.
2036
  /// \param NumClauses Number of clauses.
2037
  ///
2038
  static OMPTaskDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
2039
                                       EmptyShell);
2040
2041
  /// Return true if current directive has inner cancel directive.
2042
244
  bool hasCancel() const { return HasCancel; }
2043
2044
1.78k
  static bool classof(const Stmt *T) {
2045
1.78k
    return T->getStmtClass() == OMPTaskDirectiveClass;
2046
1.78k
  }
2047
};
2048
2049
/// This represents '#pragma omp taskyield' directive.
2050
///
2051
/// \code
2052
/// #pragma omp taskyield
2053
/// \endcode
2054
///
2055
class OMPTaskyieldDirective : public OMPExecutableDirective {
2056
  friend class ASTStmtReader;
2057
  /// Build directive with the given start and end location.
2058
  ///
2059
  /// \param StartLoc Starting location of the directive kind.
2060
  /// \param EndLoc Ending location of the directive.
2061
  ///
2062
  OMPTaskyieldDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2063
      : OMPExecutableDirective(this, OMPTaskyieldDirectiveClass,
2064
                               llvm::omp::OMPD_taskyield, StartLoc, EndLoc, 0,
2065
568
                               0) {}
2066
2067
  /// Build an empty directive.
2068
  ///
2069
  explicit OMPTaskyieldDirective()
2070
      : OMPExecutableDirective(this, OMPTaskyieldDirectiveClass,
2071
                               llvm::omp::OMPD_taskyield, SourceLocation(),
2072
13
                               SourceLocation(), 0, 0) {}
2073
2074
public:
2075
  /// Creates directive.
2076
  ///
2077
  /// \param C AST context.
2078
  /// \param StartLoc Starting location of the directive kind.
2079
  /// \param EndLoc Ending Location of the directive.
2080
  ///
2081
  static OMPTaskyieldDirective *
2082
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc);
2083
2084
  /// Creates an empty directive.
2085
  ///
2086
  /// \param C AST context.
2087
  ///
2088
  static OMPTaskyieldDirective *CreateEmpty(const ASTContext &C, EmptyShell);
2089
2090
2.37k
  static bool classof(const Stmt *T) {
2091
2.37k
    return T->getStmtClass() == OMPTaskyieldDirectiveClass;
2092
2.37k
  }
2093
};
2094
2095
/// This represents '#pragma omp barrier' directive.
2096
///
2097
/// \code
2098
/// #pragma omp barrier
2099
/// \endcode
2100
///
2101
class OMPBarrierDirective : public OMPExecutableDirective {
2102
  friend class ASTStmtReader;
2103
  /// Build directive with the given start and end location.
2104
  ///
2105
  /// \param StartLoc Starting location of the directive kind.
2106
  /// \param EndLoc Ending location of the directive.
2107
  ///
2108
  OMPBarrierDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2109
      : OMPExecutableDirective(this, OMPBarrierDirectiveClass,
2110
                               llvm::omp::OMPD_barrier, StartLoc, EndLoc, 0,
2111
352
                               0) {}
2112
2113
  /// Build an empty directive.
2114
  ///
2115
  explicit OMPBarrierDirective()
2116
      : OMPExecutableDirective(this, OMPBarrierDirectiveClass,
2117
                               llvm::omp::OMPD_barrier, SourceLocation(),
2118
27
                               SourceLocation(), 0, 0) {}
2119
2120
public:
2121
  /// Creates directive.
2122
  ///
2123
  /// \param C AST context.
2124
  /// \param StartLoc Starting location of the directive kind.
2125
  /// \param EndLoc Ending Location of the directive.
2126
  ///
2127
  static OMPBarrierDirective *
2128
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc);
2129
2130
  /// Creates an empty directive.
2131
  ///
2132
  /// \param C AST context.
2133
  ///
2134
  static OMPBarrierDirective *CreateEmpty(const ASTContext &C, EmptyShell);
2135
2136
2.32k
  static bool classof(const Stmt *T) {
2137
2.32k
    return T->getStmtClass() == OMPBarrierDirectiveClass;
2138
2.32k
  }
2139
};
2140
2141
/// This represents '#pragma omp taskwait' directive.
2142
///
2143
/// \code
2144
/// #pragma omp taskwait
2145
/// \endcode
2146
///
2147
class OMPTaskwaitDirective : public OMPExecutableDirective {
2148
  friend class ASTStmtReader;
2149
  /// Build directive with the given start and end location.
2150
  ///
2151
  /// \param StartLoc Starting location of the directive kind.
2152
  /// \param EndLoc Ending location of the directive.
2153
  ///
2154
  OMPTaskwaitDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2155
      : OMPExecutableDirective(this, OMPTaskwaitDirectiveClass,
2156
                               llvm::omp::OMPD_taskwait, StartLoc, EndLoc, 0,
2157
552
                               0) {}
2158
2159
  /// Build an empty directive.
2160
  ///
2161
  explicit OMPTaskwaitDirective()
2162
      : OMPExecutableDirective(this, OMPTaskwaitDirectiveClass,
2163
                               llvm::omp::OMPD_taskwait, SourceLocation(),
2164
13
                               SourceLocation(), 0, 0) {}
2165
2166
public:
2167
  /// Creates directive.
2168
  ///
2169
  /// \param C AST context.
2170
  /// \param StartLoc Starting location of the directive kind.
2171
  /// \param EndLoc Ending Location of the directive.
2172
  ///
2173
  static OMPTaskwaitDirective *
2174
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc);
2175
2176
  /// Creates an empty directive.
2177
  ///
2178
  /// \param C AST context.
2179
  ///
2180
  static OMPTaskwaitDirective *CreateEmpty(const ASTContext &C, EmptyShell);
2181
2182
202
  static bool classof(const Stmt *T) {
2183
202
    return T->getStmtClass() == OMPTaskwaitDirectiveClass;
2184
202
  }
2185
};
2186
2187
/// This represents '#pragma omp taskgroup' directive.
2188
///
2189
/// \code
2190
/// #pragma omp taskgroup
2191
/// \endcode
2192
///
2193
class OMPTaskgroupDirective : public OMPExecutableDirective {
2194
  friend class ASTStmtReader;
2195
  /// Build directive with the given start and end location.
2196
  ///
2197
  /// \param StartLoc Starting location of the directive kind.
2198
  /// \param EndLoc Ending location of the directive.
2199
  /// \param NumClauses Number of clauses.
2200
  ///
2201
  OMPTaskgroupDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2202
                        unsigned NumClauses)
2203
      : OMPExecutableDirective(this, OMPTaskgroupDirectiveClass,
2204
                               llvm::omp::OMPD_taskgroup, StartLoc, EndLoc,
2205
2.52k
                               NumClauses, 2) {}
2206
2207
  /// Build an empty directive.
2208
  /// \param NumClauses Number of clauses.
2209
  ///
2210
  explicit OMPTaskgroupDirective(unsigned NumClauses)
2211
      : OMPExecutableDirective(this, OMPTaskgroupDirectiveClass,
2212
                               llvm::omp::OMPD_taskgroup, SourceLocation(),
2213
88
                               SourceLocation(), NumClauses, 2) {}
2214
2215
  /// Sets the task_reduction return variable.
2216
2.61k
  void setReductionRef(Expr *RR) {
2217
2.61k
    *std::next(child_begin(), 1) = RR;
2218
2.61k
  }
2219
2220
public:
2221
  /// Creates directive.
2222
  ///
2223
  /// \param C AST context.
2224
  /// \param StartLoc Starting location of the directive kind.
2225
  /// \param EndLoc Ending Location of the directive.
2226
  /// \param Clauses List of clauses.
2227
  /// \param AssociatedStmt Statement, associated with the directive.
2228
  /// \param ReductionRef Reference to the task_reduction return variable.
2229
  ///
2230
  static OMPTaskgroupDirective *
2231
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2232
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2233
         Expr *ReductionRef);
2234
2235
  /// Creates an empty directive.
2236
  ///
2237
  /// \param C AST context.
2238
  /// \param NumClauses Number of clauses.
2239
  ///
2240
  static OMPTaskgroupDirective *CreateEmpty(const ASTContext &C,
2241
                                            unsigned NumClauses, EmptyShell);
2242
2243
2244
  /// Returns reference to the task_reduction return variable.
2245
148
  const Expr *getReductionRef() const {
2246
148
    return static_cast<const Expr *>(*std::next(child_begin(), 1));
2247
148
  }
2248
88
  Expr *getReductionRef() {
2249
88
    return static_cast<Expr *>(*std::next(child_begin(), 1));
2250
88
  }
2251
2252
12.0k
  static bool classof(const Stmt *T) {
2253
12.0k
    return T->getStmtClass() == OMPTaskgroupDirectiveClass;
2254
12.0k
  }
2255
};
2256
2257
/// This represents '#pragma omp flush' directive.
2258
///
2259
/// \code
2260
/// #pragma omp flush(a,b)
2261
/// \endcode
2262
/// In this example directive '#pragma omp flush' has 2 arguments- variables 'a'
2263
/// and 'b'.
2264
/// 'omp flush' directive does not have clauses but have an optional list of
2265
/// variables to flush. This list of variables is stored within some fake clause
2266
/// FlushClause.
2267
class OMPFlushDirective : public OMPExecutableDirective {
2268
  friend class ASTStmtReader;
2269
  /// Build directive with the given start and end location.
2270
  ///
2271
  /// \param StartLoc Starting location of the directive kind.
2272
  /// \param EndLoc Ending location of the directive.
2273
  /// \param NumClauses Number of clauses.
2274
  ///
2275
  OMPFlushDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2276
                    unsigned NumClauses)
2277
      : OMPExecutableDirective(this, OMPFlushDirectiveClass,
2278
                               llvm::omp::OMPD_flush, StartLoc, EndLoc,
2279
916
                               NumClauses, 0) {}
2280
2281
  /// Build an empty directive.
2282
  ///
2283
  /// \param NumClauses Number of clauses.
2284
  ///
2285
  explicit OMPFlushDirective(unsigned NumClauses)
2286
      : OMPExecutableDirective(this, OMPFlushDirectiveClass,
2287
                               llvm::omp::OMPD_flush, SourceLocation(),
2288
50
                               SourceLocation(), NumClauses, 0) {}
2289
2290
public:
2291
  /// Creates directive with a list of \a Clauses.
2292
  ///
2293
  /// \param C AST context.
2294
  /// \param StartLoc Starting location of the directive kind.
2295
  /// \param EndLoc Ending Location of the directive.
2296
  /// \param Clauses List of clauses (only single OMPFlushClause clause is
2297
  /// allowed).
2298
  ///
2299
  static OMPFlushDirective *Create(const ASTContext &C, SourceLocation StartLoc,
2300
                                   SourceLocation EndLoc,
2301
                                   ArrayRef<OMPClause *> Clauses);
2302
2303
  /// Creates an empty directive with the place for \a NumClauses
2304
  /// clauses.
2305
  ///
2306
  /// \param C AST context.
2307
  /// \param NumClauses Number of clauses.
2308
  ///
2309
  static OMPFlushDirective *CreateEmpty(const ASTContext &C,
2310
                                        unsigned NumClauses, EmptyShell);
2311
2312
2.51k
  static bool classof(const Stmt *T) {
2313
2.51k
    return T->getStmtClass() == OMPFlushDirectiveClass;
2314
2.51k
  }
2315
};
2316
2317
/// This represents '#pragma omp ordered' directive.
2318
///
2319
/// \code
2320
/// #pragma omp ordered
2321
/// \endcode
2322
///
2323
class OMPOrderedDirective : public OMPExecutableDirective {
2324
  friend class ASTStmtReader;
2325
  /// Build directive with the given start and end location.
2326
  ///
2327
  /// \param StartLoc Starting location of the directive kind.
2328
  /// \param EndLoc Ending location of the directive.
2329
  /// \param NumClauses Number of clauses.
2330
  ///
2331
  OMPOrderedDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2332
                      unsigned NumClauses)
2333
      : OMPExecutableDirective(this, OMPOrderedDirectiveClass,
2334
                               llvm::omp::OMPD_ordered, StartLoc, EndLoc,
2335
1.09k
                               NumClauses, 1) {}
2336
2337
  /// Build an empty directive.
2338
  ///
2339
  /// \param NumClauses Number of clauses.
2340
  ///
2341
  explicit OMPOrderedDirective(unsigned NumClauses)
2342
      : OMPExecutableDirective(this, OMPOrderedDirectiveClass,
2343
                               llvm::omp::OMPD_ordered, SourceLocation(),
2344
52
                               SourceLocation(), NumClauses, 1) {}
2345
2346
public:
2347
  /// Creates directive.
2348
  ///
2349
  /// \param C AST context.
2350
  /// \param StartLoc Starting location of the directive kind.
2351
  /// \param EndLoc Ending Location of the directive.
2352
  /// \param Clauses List of clauses.
2353
  /// \param AssociatedStmt Statement, associated with the directive.
2354
  ///
2355
  static OMPOrderedDirective *
2356
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2357
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2358
2359
  /// Creates an empty directive.
2360
  ///
2361
  /// \param C AST context.
2362
  /// \param NumClauses Number of clauses.
2363
  ///
2364
  static OMPOrderedDirective *CreateEmpty(const ASTContext &C,
2365
                                          unsigned NumClauses, EmptyShell);
2366
2367
468
  static bool classof(const Stmt *T) {
2368
468
    return T->getStmtClass() == OMPOrderedDirectiveClass;
2369
468
  }
2370
};
2371
2372
/// This represents '#pragma omp atomic' directive.
2373
///
2374
/// \code
2375
/// #pragma omp atomic capture
2376
/// \endcode
2377
/// In this example directive '#pragma omp atomic' has clause 'capture'.
2378
///
2379
class OMPAtomicDirective : public OMPExecutableDirective {
2380
  friend class ASTStmtReader;
2381
  /// Used for 'atomic update' or 'atomic capture' constructs. They may
2382
  /// have atomic expressions of forms
2383
  /// \code
2384
  /// x = x binop expr;
2385
  /// x = expr binop x;
2386
  /// \endcode
2387
  /// This field is true for the first form of the expression and false for the
2388
  /// second. Required for correct codegen of non-associative operations (like
2389
  /// << or >>).
2390
  bool IsXLHSInRHSPart;
2391
  /// Used for 'atomic update' or 'atomic capture' constructs. They may
2392
  /// have atomic expressions of forms
2393
  /// \code
2394
  /// v = x; <update x>;
2395
  /// <update x>; v = x;
2396
  /// \endcode
2397
  /// This field is true for the first(postfix) form of the expression and false
2398
  /// otherwise.
2399
  bool IsPostfixUpdate;
2400
2401
  /// Build directive with the given start and end location.
2402
  ///
2403
  /// \param StartLoc Starting location of the directive kind.
2404
  /// \param EndLoc Ending location of the directive.
2405
  /// \param NumClauses Number of clauses.
2406
  ///
2407
  OMPAtomicDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2408
                     unsigned NumClauses)
2409
      : OMPExecutableDirective(this, OMPAtomicDirectiveClass,
2410
                               llvm::omp::OMPD_atomic, StartLoc, EndLoc,
2411
                               NumClauses, 5),
2412
3.35k
        IsXLHSInRHSPart(false), IsPostfixUpdate(false) {}
2413
2414
  /// Build an empty directive.
2415
  ///
2416
  /// \param NumClauses Number of clauses.
2417
  ///
2418
  explicit OMPAtomicDirective(unsigned NumClauses)
2419
      : OMPExecutableDirective(this, OMPAtomicDirectiveClass,
2420
                               llvm::omp::OMPD_atomic, SourceLocation(),
2421
                               SourceLocation(), NumClauses, 5),
2422
584
        IsXLHSInRHSPart(false), IsPostfixUpdate(false) {}
2423
2424
  /// Set 'x' part of the associated expression/statement.
2425
3.93k
  void setX(Expr *X) { *std::next(child_begin()) = X; }
2426
  /// Set helper expression of the form
2427
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or
2428
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
2429
3.93k
  void setUpdateExpr(Expr *UE) { *std::next(child_begin(), 2) = UE; }
2430
  /// Set 'v' part of the associated expression/statement.
2431
3.93k
  void setV(Expr *V) { *std::next(child_begin(), 3) = V; }
2432
  /// Set 'expr' part of the associated expression/statement.
2433
3.93k
  void setExpr(Expr *E) { *std::next(child_begin(), 4) = E; }
2434
2435
public:
2436
  /// Creates directive with a list of \a Clauses and 'x', 'v' and 'expr'
2437
  /// parts of the atomic construct (see Section 2.12.6, atomic Construct, for
2438
  /// detailed description of 'x', 'v' and 'expr').
2439
  ///
2440
  /// \param C AST context.
2441
  /// \param StartLoc Starting location of the directive kind.
2442
  /// \param EndLoc Ending Location of the directive.
2443
  /// \param Clauses List of clauses.
2444
  /// \param AssociatedStmt Statement, associated with the directive.
2445
  /// \param X 'x' part of the associated expression/statement.
2446
  /// \param V 'v' part of the associated expression/statement.
2447
  /// \param E 'expr' part of the associated expression/statement.
2448
  /// \param UE Helper expression of the form
2449
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or
2450
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
2451
  /// \param IsXLHSInRHSPart true if \a UE has the first form and false if the
2452
  /// second.
2453
  /// \param IsPostfixUpdate true if original value of 'x' must be stored in
2454
  /// 'v', not an updated one.
2455
  static OMPAtomicDirective *
2456
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2457
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *X, Expr *V,
2458
         Expr *E, Expr *UE, bool IsXLHSInRHSPart, bool IsPostfixUpdate);
2459
2460
  /// Creates an empty directive with the place for \a NumClauses
2461
  /// clauses.
2462
  ///
2463
  /// \param C AST context.
2464
  /// \param NumClauses Number of clauses.
2465
  ///
2466
  static OMPAtomicDirective *CreateEmpty(const ASTContext &C,
2467
                                         unsigned NumClauses, EmptyShell);
2468
2469
  /// Get 'x' part of the associated expression/statement.
2470
584
  Expr *getX() { return cast_or_null<Expr>(*std::next(child_begin())); }
2471
452
  const Expr *getX() const {
2472
452
    return cast_or_null<Expr>(*std::next(child_begin()));
2473
452
  }
2474
  /// Get helper expression of the form
2475
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or
2476
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
2477
584
  Expr *getUpdateExpr() {
2478
584
    return cast_or_null<Expr>(*std::next(child_begin(), 2));
2479
584
  }
2480
452
  const Expr *getUpdateExpr() const {
2481
452
    return cast_or_null<Expr>(*std::next(child_begin(), 2));
2482
452
  }
2483
  /// Return true if helper update expression has form
2484
  /// 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' and false if it has form
2485
  /// 'OpaqueValueExpr(expr) binop OpaqueValueExpr(x)'.
2486
1.03k
  bool isXLHSInRHSPart() const { return IsXLHSInRHSPart; }
2487
  /// Return true if 'v' expression must be updated to original value of
2488
  /// 'x', false if 'v' must be updated to the new value of 'x'.
2489
1.03k
  bool isPostfixUpdate() const { return IsPostfixUpdate; }
2490
  /// Get 'v' part of the associated expression/statement.
2491
584
  Expr *getV() { return cast_or_null<Expr>(*std::next(child_begin(), 3)); }
2492
452
  const Expr *getV() const {
2493
452
    return cast_or_null<Expr>(*std::next(child_begin(), 3));
2494
452
  }
2495
  /// Get 'expr' part of the associated expression/statement.
2496
584
  Expr *getExpr() { return cast_or_null<Expr>(*std::next(child_begin(), 4)); }
2497
452
  const Expr *getExpr() const {
2498
452
    return cast_or_null<Expr>(*std::next(child_begin(), 4));
2499
452
  }
2500
2501
1.18k
  static bool classof(const Stmt *T) {
2502
1.18k
    return T->getStmtClass() == OMPAtomicDirectiveClass;
2503
1.18k
  }
2504
};
2505
2506
/// This represents '#pragma omp target' directive.
2507
///
2508
/// \code
2509
/// #pragma omp target if(a)
2510
/// \endcode
2511
/// In this example directive '#pragma omp target' has clause 'if' with
2512
/// condition 'a'.
2513
///
2514
class OMPTargetDirective : public OMPExecutableDirective {
2515
  friend class ASTStmtReader;
2516
  /// Build directive with the given start and end location.
2517
  ///
2518
  /// \param StartLoc Starting location of the directive kind.
2519
  /// \param EndLoc Ending location of the directive.
2520
  /// \param NumClauses Number of clauses.
2521
  ///
2522
  OMPTargetDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2523
                     unsigned NumClauses)
2524
      : OMPExecutableDirective(this, OMPTargetDirectiveClass,
2525
                               llvm::omp::OMPD_target, StartLoc, EndLoc,
2526
37.0k
                               NumClauses, 1) {}
2527
2528
  /// Build an empty directive.
2529
  ///
2530
  /// \param NumClauses Number of clauses.
2531
  ///
2532
  explicit OMPTargetDirective(unsigned NumClauses)
2533
      : OMPExecutableDirective(this, OMPTargetDirectiveClass,
2534
                               llvm::omp::OMPD_target, SourceLocation(),
2535
3.11k
                               SourceLocation(), NumClauses, 1) {}
2536
2537
public:
2538
  /// Creates directive with a list of \a Clauses.
2539
  ///
2540
  /// \param C AST context.
2541
  /// \param StartLoc Starting location of the directive kind.
2542
  /// \param EndLoc Ending Location of the directive.
2543
  /// \param Clauses List of clauses.
2544
  /// \param AssociatedStmt Statement, associated with the directive.
2545
  ///
2546
  static OMPTargetDirective *
2547
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2548
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2549
2550
  /// Creates an empty directive with the place for \a NumClauses
2551
  /// clauses.
2552
  ///
2553
  /// \param C AST context.
2554
  /// \param NumClauses Number of clauses.
2555
  ///
2556
  static OMPTargetDirective *CreateEmpty(const ASTContext &C,
2557
                                         unsigned NumClauses, EmptyShell);
2558
2559
16.2k
  static bool classof(const Stmt *T) {
2560
16.2k
    return T->getStmtClass() == OMPTargetDirectiveClass;
2561
16.2k
  }
2562
};
2563
2564
/// This represents '#pragma omp target data' directive.
2565
///
2566
/// \code
2567
/// #pragma omp target data device(0) if(a) map(b[:])
2568
/// \endcode
2569
/// In this example directive '#pragma omp target data' has clauses 'device'
2570
/// with the value '0', 'if' with condition 'a' and 'map' with array
2571
/// section 'b[:]'.
2572
///
2573
class OMPTargetDataDirective : public OMPExecutableDirective {
2574
  friend class ASTStmtReader;
2575
  /// Build directive with the given start and end location.
2576
  ///
2577
  /// \param StartLoc Starting location of the directive kind.
2578
  /// \param EndLoc Ending Location of the directive.
2579
  /// \param NumClauses The number of clauses.
2580
  ///
2581
  OMPTargetDataDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2582
                         unsigned NumClauses)
2583
      : OMPExecutableDirective(this, OMPTargetDataDirectiveClass,
2584
                               llvm::omp::OMPD_target_data, StartLoc, EndLoc,
2585
1.65k
                               NumClauses, 1) {}
2586
2587
  /// Build an empty directive.
2588
  ///
2589
  /// \param NumClauses Number of clauses.
2590
  ///
2591
  explicit OMPTargetDataDirective(unsigned NumClauses)
2592
      : OMPExecutableDirective(this, OMPTargetDataDirectiveClass,
2593
                               llvm::omp::OMPD_target_data, SourceLocation(),
2594
168
                               SourceLocation(), NumClauses, 1) {}
2595
2596
public:
2597
  /// Creates directive with a list of \a Clauses.
2598
  ///
2599
  /// \param C AST context.
2600
  /// \param StartLoc Starting location of the directive kind.
2601
  /// \param EndLoc Ending Location of the directive.
2602
  /// \param Clauses List of clauses.
2603
  /// \param AssociatedStmt Statement, associated with the directive.
2604
  ///
2605
  static OMPTargetDataDirective *
2606
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2607
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2608
2609
  /// Creates an empty directive with the place for \a N clauses.
2610
  ///
2611
  /// \param C AST context.
2612
  /// \param N The number of clauses.
2613
  ///
2614
  static OMPTargetDataDirective *CreateEmpty(const ASTContext &C, unsigned N,
2615
                                             EmptyShell);
2616
2617
809
  static bool classof(const Stmt *T) {
2618
809
    return T->getStmtClass() == OMPTargetDataDirectiveClass;
2619
809
  }
2620
};
2621
2622
/// This represents '#pragma omp target enter data' directive.
2623
///
2624
/// \code
2625
/// #pragma omp target enter data device(0) if(a) map(b[:])
2626
/// \endcode
2627
/// In this example directive '#pragma omp target enter data' has clauses
2628
/// 'device' with the value '0', 'if' with condition 'a' and 'map' with array
2629
/// section 'b[:]'.
2630
///
2631
class OMPTargetEnterDataDirective : public OMPExecutableDirective {
2632
  friend class ASTStmtReader;
2633
  /// Build directive with the given start and end location.
2634
  ///
2635
  /// \param StartLoc Starting location of the directive kind.
2636
  /// \param EndLoc Ending Location of the directive.
2637
  /// \param NumClauses The number of clauses.
2638
  ///
2639
  OMPTargetEnterDataDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2640
                              unsigned NumClauses)
2641
      : OMPExecutableDirective(this, OMPTargetEnterDataDirectiveClass,
2642
                               llvm::omp::OMPD_target_enter_data, StartLoc,
2643
1.04k
                               EndLoc, NumClauses, /*NumChildren=*/1) {}
2644
2645
  /// Build an empty directive.
2646
  ///
2647
  /// \param NumClauses Number of clauses.
2648
  ///
2649
  explicit OMPTargetEnterDataDirective(unsigned NumClauses)
2650
      : OMPExecutableDirective(this, OMPTargetEnterDataDirectiveClass,
2651
                               llvm::omp::OMPD_target_enter_data,
2652
                               SourceLocation(), SourceLocation(), NumClauses,
2653
164
                               /*NumChildren=*/1) {}
2654
2655
public:
2656
  /// Creates directive with a list of \a Clauses.
2657
  ///
2658
  /// \param C AST context.
2659
  /// \param StartLoc Starting location of the directive kind.
2660
  /// \param EndLoc Ending Location of the directive.
2661
  /// \param Clauses List of clauses.
2662
  /// \param AssociatedStmt Statement, associated with the directive.
2663
  ///
2664
  static OMPTargetEnterDataDirective *
2665
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2666
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2667
2668
  /// Creates an empty directive with the place for \a N clauses.
2669
  ///
2670
  /// \param C AST context.
2671
  /// \param N The number of clauses.
2672
  ///
2673
  static OMPTargetEnterDataDirective *CreateEmpty(const ASTContext &C,
2674
                                                  unsigned N, EmptyShell);
2675
2676
450k
  static bool classof(const Stmt *T) {
2677
450k
    return T->getStmtClass() == OMPTargetEnterDataDirectiveClass;
2678
450k
  }
2679
};
2680
2681
/// This represents '#pragma omp target exit data' directive.
2682
///
2683
/// \code
2684
/// #pragma omp target exit data device(0) if(a) map(b[:])
2685
/// \endcode
2686
/// In this example directive '#pragma omp target exit data' has clauses
2687
/// 'device' with the value '0', 'if' with condition 'a' and 'map' with array
2688
/// section 'b[:]'.
2689
///
2690
class OMPTargetExitDataDirective : public OMPExecutableDirective {
2691
  friend class ASTStmtReader;
2692
  /// Build directive with the given start and end location.
2693
  ///
2694
  /// \param StartLoc Starting location of the directive kind.
2695
  /// \param EndLoc Ending Location of the directive.
2696
  /// \param NumClauses The number of clauses.
2697
  ///
2698
  OMPTargetExitDataDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2699
                             unsigned NumClauses)
2700
      : OMPExecutableDirective(this, OMPTargetExitDataDirectiveClass,
2701
                               llvm::omp::OMPD_target_exit_data, StartLoc,
2702
1.05k
                               EndLoc, NumClauses, /*NumChildren=*/1) {}
2703
2704
  /// Build an empty directive.
2705
  ///
2706
  /// \param NumClauses Number of clauses.
2707
  ///
2708
  explicit OMPTargetExitDataDirective(unsigned NumClauses)
2709
      : OMPExecutableDirective(this, OMPTargetExitDataDirectiveClass,
2710
                               llvm::omp::OMPD_target_exit_data,
2711
                               SourceLocation(), SourceLocation(), NumClauses,
2712
164
                               /*NumChildren=*/1) {}
2713
2714
public:
2715
  /// Creates directive with a list of \a Clauses.
2716
  ///
2717
  /// \param C AST context.
2718
  /// \param StartLoc Starting location of the directive kind.
2719
  /// \param EndLoc Ending Location of the directive.
2720
  /// \param Clauses List of clauses.
2721
  /// \param AssociatedStmt Statement, associated with the directive.
2722
  ///
2723
  static OMPTargetExitDataDirective *
2724
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2725
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2726
2727
  /// Creates an empty directive with the place for \a N clauses.
2728
  ///
2729
  /// \param C AST context.
2730
  /// \param N The number of clauses.
2731
  ///
2732
  static OMPTargetExitDataDirective *CreateEmpty(const ASTContext &C,
2733
                                                 unsigned N, EmptyShell);
2734
2735
449k
  static bool classof(const Stmt *T) {
2736
449k
    return T->getStmtClass() == OMPTargetExitDataDirectiveClass;
2737
449k
  }
2738
};
2739
2740
/// This represents '#pragma omp target parallel' directive.
2741
///
2742
/// \code
2743
/// #pragma omp target parallel if(a)
2744
/// \endcode
2745
/// In this example directive '#pragma omp target parallel' has clause 'if' with
2746
/// condition 'a'.
2747
///
2748
class OMPTargetParallelDirective : public OMPExecutableDirective {
2749
  friend class ASTStmtReader;
2750
  /// Build directive with the given start and end location.
2751
  ///
2752
  /// \param StartLoc Starting location of the directive kind.
2753
  /// \param EndLoc Ending location of the directive.
2754
  /// \param NumClauses Number of clauses.
2755
  ///
2756
  OMPTargetParallelDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2757
                             unsigned NumClauses)
2758
      : OMPExecutableDirective(this, OMPTargetParallelDirectiveClass,
2759
                               llvm::omp::OMPD_target_parallel, StartLoc,
2760
4.53k
                               EndLoc, NumClauses, /*NumChildren=*/1) {}
2761
2762
  /// Build an empty directive.
2763
  ///
2764
  /// \param NumClauses Number of clauses.
2765
  ///
2766
  explicit OMPTargetParallelDirective(unsigned NumClauses)
2767
      : OMPExecutableDirective(this, OMPTargetParallelDirectiveClass,
2768
                               llvm::omp::OMPD_target_parallel,
2769
                               SourceLocation(), SourceLocation(), NumClauses,
2770
380
                               /*NumChildren=*/1) {}
2771
2772
public:
2773
  /// Creates directive with a list of \a Clauses.
2774
  ///
2775
  /// \param C AST context.
2776
  /// \param StartLoc Starting location of the directive kind.
2777
  /// \param EndLoc Ending Location of the directive.
2778
  /// \param Clauses List of clauses.
2779
  /// \param AssociatedStmt Statement, associated with the directive.
2780
  ///
2781
  static OMPTargetParallelDirective *
2782
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2783
         ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2784
2785
  /// Creates an empty directive with the place for \a NumClauses
2786
  /// clauses.
2787
  ///
2788
  /// \param C AST context.
2789
  /// \param NumClauses Number of clauses.
2790
  ///
2791
  static OMPTargetParallelDirective *
2792
  CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
2793
2794
2.15k
  static bool classof(const Stmt *T) {
2795
2.15k
    return T->getStmtClass() == OMPTargetParallelDirectiveClass;
2796
2.15k
  }
2797
};
2798
2799
/// This represents '#pragma omp target parallel for' directive.
2800
///
2801
/// \code
2802
/// #pragma omp target parallel for private(a,b) reduction(+:c,d)
2803
/// \endcode
2804
/// In this example directive '#pragma omp target parallel for' has clauses
2805
/// 'private' with the variables 'a' and 'b' and 'reduction' with operator '+'
2806
/// and variables 'c' and 'd'.
2807
///
2808
class OMPTargetParallelForDirective : public OMPLoopDirective {
2809
  friend class ASTStmtReader;
2810
2811
  /// true if current region has inner cancel directive.
2812
  bool HasCancel;
2813
2814
  /// Build directive with the given start and end location.
2815
  ///
2816
  /// \param StartLoc Starting location of the directive kind.
2817
  /// \param EndLoc Ending location of the directive.
2818
  /// \param CollapsedNum Number of collapsed nested loops.
2819
  /// \param NumClauses Number of clauses.
2820
  ///
2821
  OMPTargetParallelForDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2822
                                unsigned CollapsedNum, unsigned NumClauses)
2823
      : OMPLoopDirective(this, OMPTargetParallelForDirectiveClass,
2824
                         llvm::omp::OMPD_target_parallel_for, StartLoc, EndLoc,
2825
                         CollapsedNum, NumClauses),
2826
5.22k
        HasCancel(false) {}
2827
2828
  /// Build an empty directive.
2829
  ///
2830
  /// \param CollapsedNum Number of collapsed nested loops.
2831
  /// \param NumClauses Number of clauses.
2832
  ///
2833
  explicit OMPTargetParallelForDirective(unsigned CollapsedNum,
2834
                                         unsigned NumClauses)
2835
      : OMPLoopDirective(this, OMPTargetParallelForDirectiveClass,
2836
                         llvm::omp::OMPD_target_parallel_for, SourceLocation(),
2837
                         SourceLocation(), CollapsedNum, NumClauses),
2838
290
        HasCancel(false) {}
2839
2840
  /// Set cancel state.
2841
5.51k
  void setHasCancel(bool Has) { HasCancel = Has; }
2842
2843
public:
2844
  /// Creates directive with a list of \a Clauses.
2845
  ///
2846
  /// \param C AST context.
2847
  /// \param StartLoc Starting location of the directive kind.
2848
  /// \param EndLoc Ending Location of the directive.
2849
  /// \param CollapsedNum Number of collapsed loops.
2850
  /// \param Clauses List of clauses.
2851
  /// \param AssociatedStmt Statement, associated with the directive.
2852
  /// \param Exprs Helper expressions for CodeGen.
2853
  /// \param HasCancel true if current directive has inner cancel directive.
2854
  ///
2855
  static OMPTargetParallelForDirective *
2856
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2857
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2858
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
2859
2860
  /// Creates an empty directive with the place
2861
  /// for \a NumClauses clauses.
2862
  ///
2863
  /// \param C AST context.
2864
  /// \param CollapsedNum Number of collapsed nested loops.
2865
  /// \param NumClauses Number of clauses.
2866
  ///
2867
  static OMPTargetParallelForDirective *CreateEmpty(const ASTContext &C,
2868
                                                    unsigned NumClauses,
2869
                                                    unsigned CollapsedNum,
2870
                                                    EmptyShell);
2871
2872
  /// Return true if current directive has inner cancel directive.
2873
964
  bool hasCancel() const { return HasCancel; }
2874
2875
9.76k
  static bool classof(const Stmt *T) {
2876
9.76k
    return T->getStmtClass() == OMPTargetParallelForDirectiveClass;
2877
9.76k
  }
2878
};
2879
2880
/// This represents '#pragma omp teams' directive.
2881
///
2882
/// \code
2883
/// #pragma omp teams if(a)
2884
/// \endcode
2885
/// In this example directive '#pragma omp teams' has clause 'if' with
2886
/// condition 'a'.
2887
///
2888
class OMPTeamsDirective : public OMPExecutableDirective {
2889
  friend class ASTStmtReader;
2890
  /// Build directive with the given start and end location.
2891
  ///
2892
  /// \param StartLoc Starting location of the directive kind.
2893
  /// \param EndLoc Ending location of the directive.
2894
  /// \param NumClauses Number of clauses.
2895
  ///
2896
  OMPTeamsDirective(SourceLocation StartLoc, SourceLocation EndLoc,
2897
                    unsigned NumClauses)
2898
      : OMPExecutableDirective(this, OMPTeamsDirectiveClass,
2899
                               llvm::omp::OMPD_teams, StartLoc, EndLoc,
2900
14.9k
                               NumClauses, 1) {}
2901
2902
  /// Build an empty directive.
2903
  ///
2904
  /// \param NumClauses Number of clauses.
2905
  ///
2906
  explicit OMPTeamsDirective(unsigned NumClauses)
2907
      : OMPExecutableDirective(this, OMPTeamsDirectiveClass,
2908
                               llvm::omp::OMPD_teams, SourceLocation(),
2909
816
                               SourceLocation(), NumClauses, 1) {}
2910
2911
public:
2912
  /// Creates directive with a list of \a Clauses.
2913
  ///
2914
  /// \param C AST context.
2915
  /// \param StartLoc Starting location of the directive kind.
2916
  /// \param EndLoc Ending Location of the directive.
2917
  /// \param Clauses List of clauses.
2918
  /// \param AssociatedStmt Statement, associated with the directive.
2919
  ///
2920
  static OMPTeamsDirective *Create(const ASTContext &C, SourceLocation StartLoc,
2921
                                   SourceLocation EndLoc,
2922
                                   ArrayRef<OMPClause *> Clauses,
2923
                                   Stmt *AssociatedStmt);
2924
2925
  /// Creates an empty directive with the place for \a NumClauses
2926
  /// clauses.
2927
  ///
2928
  /// \param C AST context.
2929
  /// \param NumClauses Number of clauses.
2930
  ///
2931
  static OMPTeamsDirective *CreateEmpty(const ASTContext &C,
2932
                                        unsigned NumClauses, EmptyShell);
2933
2934
6.22k
  static bool classof(const Stmt *T) {
2935
6.22k
    return T->getStmtClass() == OMPTeamsDirectiveClass;
2936
6.22k
  }
2937
};
2938
2939
/// This represents '#pragma omp cancellation point' directive.
2940
///
2941
/// \code
2942
/// #pragma omp cancellation point for
2943
/// \endcode
2944
///
2945
/// In this example a cancellation point is created for innermost 'for' region.
2946
class OMPCancellationPointDirective : public OMPExecutableDirective {
2947
  friend class ASTStmtReader;
2948
  OpenMPDirectiveKind CancelRegion;
2949
  /// Build directive with the given start and end location.
2950
  ///
2951
  /// \param StartLoc Starting location of the directive kind.
2952
  /// \param EndLoc Ending location of the directive.
2953
  ///
2954
  OMPCancellationPointDirective(SourceLocation StartLoc, SourceLocation EndLoc)
2955
      : OMPExecutableDirective(this, OMPCancellationPointDirectiveClass,
2956
                               llvm::omp::OMPD_cancellation_point, StartLoc,
2957
                               EndLoc, 0, 0),
2958
155
        CancelRegion(llvm::omp::OMPD_unknown) {}
2959
2960
  /// Build an empty directive.
2961
  ///
2962
  explicit OMPCancellationPointDirective()
2963
      : OMPExecutableDirective(this, OMPCancellationPointDirectiveClass,
2964
                               llvm::omp::OMPD_cancellation_point,
2965
                               SourceLocation(), SourceLocation(), 0, 0),
2966
56
        CancelRegion(llvm::omp::OMPD_unknown) {}
2967
2968
  /// Set cancel region for current cancellation point.
2969
  /// \param CR Cancellation region.
2970
211
  void setCancelRegion(OpenMPDirectiveKind CR) { CancelRegion = CR; }
2971
2972
public:
2973
  /// Creates directive.
2974
  ///
2975
  /// \param C AST context.
2976
  /// \param StartLoc Starting location of the directive kind.
2977
  /// \param EndLoc Ending Location of the directive.
2978
  ///
2979
  static OMPCancellationPointDirective *
2980
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2981
         OpenMPDirectiveKind CancelRegion);
2982
2983
  /// Creates an empty directive.
2984
  ///
2985
  /// \param C AST context.
2986
  ///
2987
  static OMPCancellationPointDirective *CreateEmpty(const ASTContext &C,
2988
                                                    EmptyShell);
2989
2990
  /// Get cancellation region for the current cancellation point.
2991
190
  OpenMPDirectiveKind getCancelRegion() const { return CancelRegion; }
2992
2993
98
  static bool classof(const Stmt *T) {
2994
98
    return T->getStmtClass() == OMPCancellationPointDirectiveClass;
2995
98
  }
2996
};
2997
2998
/// This represents '#pragma omp cancel' directive.
2999
///
3000
/// \code
3001
/// #pragma omp cancel for
3002
/// \endcode
3003
///
3004
/// In this example a cancel is created for innermost 'for' region.
3005
class OMPCancelDirective : public OMPExecutableDirective {
3006
  friend class ASTStmtReader;
3007
  OpenMPDirectiveKind CancelRegion;
3008
  /// Build directive with the given start and end location.
3009
  ///
3010
  /// \param StartLoc Starting location of the directive kind.
3011
  /// \param EndLoc Ending location of the directive.
3012
  /// \param NumClauses Number of clauses.
3013
  ///
3014
  OMPCancelDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3015
                     unsigned NumClauses)
3016
      : OMPExecutableDirective(this, OMPCancelDirectiveClass,
3017
                               llvm::omp::OMPD_cancel, StartLoc, EndLoc,
3018
                               NumClauses, 0),
3019
378
        CancelRegion(llvm::omp::OMPD_unknown) {}
3020
3021
  /// Build an empty directive.
3022
  ///
3023
  /// \param NumClauses Number of clauses.
3024
  explicit OMPCancelDirective(unsigned NumClauses)
3025
      : OMPExecutableDirective(this, OMPCancelDirectiveClass,
3026
                               llvm::omp::OMPD_cancel, SourceLocation(),
3027
                               SourceLocation(), NumClauses, 0),
3028
98
        CancelRegion(llvm::omp::OMPD_unknown) {}
3029
3030
  /// Set cancel region for current cancellation point.
3031
  /// \param CR Cancellation region.
3032
476
  void setCancelRegion(OpenMPDirectiveKind CR) { CancelRegion = CR; }
3033
3034
public:
3035
  /// Creates directive.
3036
  ///
3037
  /// \param C AST context.
3038
  /// \param StartLoc Starting location of the directive kind.
3039
  /// \param EndLoc Ending Location of the directive.
3040
  /// \param Clauses List of clauses.
3041
  ///
3042
  static OMPCancelDirective *
3043
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3044
         ArrayRef<OMPClause *> Clauses, OpenMPDirectiveKind CancelRegion);
3045
3046
  /// Creates an empty directive.
3047
  ///
3048
  /// \param C AST context.
3049
  /// \param NumClauses Number of clauses.
3050
  ///
3051
  static OMPCancelDirective *CreateEmpty(const ASTContext &C,
3052
                                         unsigned NumClauses, EmptyShell);
3053
3054
  /// Get cancellation region for the current cancellation point.
3055
358
  OpenMPDirectiveKind getCancelRegion() const { return CancelRegion; }
3056
3057
232
  static bool classof(const Stmt *T) {
3058
232
    return T->getStmtClass() == OMPCancelDirectiveClass;
3059
232
  }
3060
};
3061
3062
/// This represents '#pragma omp taskloop' directive.
3063
///
3064
/// \code
3065
/// #pragma omp taskloop private(a,b) grainsize(val) num_tasks(num)
3066
/// \endcode
3067
/// In this example directive '#pragma omp taskloop' has clauses 'private'
3068
/// with the variables 'a' and 'b', 'grainsize' with expression 'val' and
3069
/// 'num_tasks' with expression 'num'.
3070
///
3071
class OMPTaskLoopDirective : public OMPLoopDirective {
3072
  friend class ASTStmtReader;
3073
  /// true if the construct has inner cancel directive.
3074
  bool HasCancel;
3075
3076
  /// Build directive with the given start and end location.
3077
  ///
3078
  /// \param StartLoc Starting location of the directive kind.
3079
  /// \param EndLoc Ending location of the directive.
3080
  /// \param CollapsedNum Number of collapsed nested loops.
3081
  /// \param NumClauses Number of clauses.
3082
  ///
3083
  OMPTaskLoopDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3084
                       unsigned CollapsedNum, unsigned NumClauses)
3085
      : OMPLoopDirective(this, OMPTaskLoopDirectiveClass,
3086
                         llvm::omp::OMPD_taskloop, StartLoc, EndLoc,
3087
                         CollapsedNum, NumClauses),
3088
3.77k
        HasCancel(false) {}
3089
3090
  /// Build an empty directive.
3091
  ///
3092
  /// \param CollapsedNum Number of collapsed nested loops.
3093
  /// \param NumClauses Number of clauses.
3094
  ///
3095
  explicit OMPTaskLoopDirective(unsigned CollapsedNum, unsigned NumClauses)
3096
      : OMPLoopDirective(this, OMPTaskLoopDirectiveClass,
3097
                         llvm::omp::OMPD_taskloop, SourceLocation(),
3098
                         SourceLocation(), CollapsedNum, NumClauses),
3099
32
        HasCancel(false) {}
3100
3101
  /// Set cancel state.
3102
3.81k
  void setHasCancel(bool Has) { HasCancel = Has; }
3103
3104
public:
3105
  /// Creates directive with a list of \a Clauses.
3106
  ///
3107
  /// \param C AST context.
3108
  /// \param StartLoc Starting location of the directive kind.
3109
  /// \param EndLoc Ending Location of the directive.
3110
  /// \param CollapsedNum Number of collapsed loops.
3111
  /// \param Clauses List of clauses.
3112
  /// \param AssociatedStmt Statement, associated with the directive.
3113
  /// \param Exprs Helper expressions for CodeGen.
3114
  /// \param HasCancel true if this directive has inner cancel directive.
3115
  ///
3116
  static OMPTaskLoopDirective *
3117
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3118
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3119
         Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
3120
3121
  /// Creates an empty directive with the place
3122
  /// for \a NumClauses clauses.
3123
  ///
3124
  /// \param C AST context.
3125
  /// \param CollapsedNum Number of collapsed nested loops.
3126
  /// \param NumClauses Number of clauses.
3127
  ///
3128
  static OMPTaskLoopDirective *CreateEmpty(const ASTContext &C,
3129
                                           unsigned NumClauses,
3130
                                           unsigned CollapsedNum, EmptyShell);
3131
3132
  /// Return true if current directive has inner cancel directive.
3133
67
  bool hasCancel() const { return HasCancel; }
3134
3135
2.13k
  static bool classof(const Stmt *T) {
3136
2.13k
    return T->getStmtClass() == OMPTaskLoopDirectiveClass;
3137
2.13k
  }
3138
};
3139
3140
/// This represents '#pragma omp taskloop simd' directive.
3141
///
3142
/// \code
3143
/// #pragma omp taskloop simd private(a,b) grainsize(val) num_tasks(num)
3144
/// \endcode
3145
/// In this example directive '#pragma omp taskloop simd' has clauses 'private'
3146
/// with the variables 'a' and 'b', 'grainsize' with expression 'val' and
3147
/// 'num_tasks' with expression 'num'.
3148
///
3149
class OMPTaskLoopSimdDirective : public OMPLoopDirective {
3150
  friend class ASTStmtReader;
3151
  /// Build directive with the given start and end location.
3152
  ///
3153
  /// \param StartLoc Starting location of the directive kind.
3154
  /// \param EndLoc Ending location of the directive.
3155
  /// \param CollapsedNum Number of collapsed nested loops.
3156
  /// \param NumClauses Number of clauses.
3157
  ///
3158
  OMPTaskLoopSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc,
3159
                           unsigned CollapsedNum, unsigned NumClauses)
3160
      : OMPLoopDirective(this, OMPTaskLoopSimdDirectiveClass,
3161
                         llvm::omp::OMPD_taskloop_simd, StartLoc, EndLoc,
3162
3.65k
                         CollapsedNum, NumClauses) {}
3163
3164
  /// Build an empty directive.
3165
  ///
3166
  /// \param CollapsedNum Number of collapsed nested loops.
3167
  /// \param NumClauses Number of clauses.
3168
  ///
3169
  explicit OMPTaskLoopSimdDirective(unsigned CollapsedNum, unsigned NumClauses)
3170
      : OMPLoopDirective(this, OMPTaskLoopSimdDirectiveClass,
3171
                         llvm::omp::OMPD_taskloop_simd, SourceLocation(),
3172
46
                         SourceLocation(), CollapsedNum, NumClauses) {}
3173
3174
public:
3175
  /// Creates directive with a list of \a Clauses.
3176
  ///
3177
  /// \param C AST context.
3178
  /// \param StartLoc Starting location of the directive kind.
3179
  /// \param EndLoc Ending Location of the directive.
3180
  /// \param CollapsedNum Number of collapsed loops.
3181
  /// \param Clauses List of clauses.
3182
  /// \param AssociatedStmt Statement, associated with the directive.
3183
  /// \param Exprs Helper expressions for CodeGen.
3184
  ///
3185
  static OMPTaskLoopSimdDirective *
3186
  Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3187
         unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3188
         Stmt *AssociatedStmt, const HelperExprs &Exprs);
3189
3190
  /// Creates an empty directive with the place
3191
  /// for \a NumClauses clauses.
3192
  ///
3193
  /// \param C AST context.
3194
  /// \param CollapsedNum Number of collapsed nested loops.
3195
  /// \param NumClauses Number of clauses.
3196
  ///
3197
  static OMPTaskLoopSimdDirective *CreateEmpty(const ASTContext &C,
3198
                                               unsigned NumClauses,
3199
                                               unsigned CollapsedNum,
3200
                                               EmptyShell);
3201
3202