MLIR 22.0.0git
OpenMPCommon.h
Go to the documentation of this file.
1//===- OpenMPCommon.h - Utils for translating MLIR dialect to LLVM IR------===//
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 defines general utilities for MLIR Dialect translations to LLVM IR.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_TARGET_LLVMIR_DIALECT_OPENMPCOMMON_H
14#define MLIR_TARGET_LLVMIR_DIALECT_OPENMPCOMMON_H
15
17#include "mlir/IR/Location.h"
18#include "mlir/Support/LLVM.h"
19
20#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
21#include "llvm/IR/IRBuilder.h"
22
23namespace mlir {
24namespace LLVM {
25
26/// Create a constant string location from the MLIR Location information.
27llvm::Constant *createSourceLocStrFromLocation(Location loc,
28 llvm::OpenMPIRBuilder &builder,
29 StringRef name,
30 uint32_t &strLen);
31
32/// Create a constant string representing the mapping information extracted from
33/// the MLIR location information.
34llvm::Constant *createMappingInformation(Location loc,
35 llvm::OpenMPIRBuilder &builder);
36
37} // namespace LLVM
38} // namespace mlir
39
40#endif // MLIR_TARGET_LLVMIR_DIALECT_OPENMPCOMMON_H
llvm::Constant * createMappingInformation(Location loc, llvm::OpenMPIRBuilder &builder)
Create a constant string representing the mapping information extracted from the MLIR location inform...
llvm::Constant * createSourceLocStrFromLocation(Location loc, llvm::OpenMPIRBuilder &builder, StringRef name, uint32_t &strLen)
Create a constant string location from the MLIR Location information.
Include the generated interface declarations.