1 //===-- OMP.h - Core OpenMP definitions and declarations ---------- 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 // 9 // This file contains the core set of OpenMP definitions and declarations. 10 // 11 //===----------------------------------------------------------------------===// 12 13 #ifndef LLVM_FRONTEND_OPENMP_OMP_H 14 #define LLVM_FRONTEND_OPENMP_OMP_H 15 16 #include "llvm/Frontend/OpenMP/OMP.h.inc" 17 18 #include "llvm/ADT/ArrayRef.h" 19 #include "llvm/ADT/SmallVector.h" 20 #include "llvm/ADT/StringRef.h" 21 22 namespace llvm::omp { 23 ArrayRef<Directive> getLeafConstructs(Directive D); 24 ArrayRef<Directive> getLeafConstructsOrSelf(Directive D); 25 26 ArrayRef<Directive> 27 getLeafOrCompositeConstructs(Directive D, SmallVectorImpl<Directive> &Output); 28 29 Directive getCompoundConstruct(ArrayRef<Directive> Parts); 30 31 bool isLeafConstruct(Directive D); 32 bool isCompositeConstruct(Directive D); 33 bool isCombinedConstruct(Directive D); 34 35 /// Create a nicer version of a function name for humans to look at. 36 std::string prettifyFunctionName(StringRef FunctionName); 37 38 /// Deconstruct an OpenMP kernel name into the parent function name and the line 39 /// number. 40 std::string deconstructOpenMPKernelName(StringRef KernelName, unsigned &LineNo); 41 42 } // namespace llvm::omp 43 44 #endif // LLVM_FRONTEND_OPENMP_OMP_H 45