47 lines
1.4 KiB
C
47 lines
1.4 KiB
C
//===-- mlir-c/Dialect/LLVM.h - C API for LLVM --------------------*- C -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM
|
|
// Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef MLIR_C_DIALECT_LLVM_H
|
|
#define MLIR_C_DIALECT_LLVM_H
|
|
|
|
#include "mlir-c/IR.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(LLVM, llvm);
|
|
|
|
/// Creates an llvm.ptr type.
|
|
MLIR_CAPI_EXPORTED MlirType mlirLLVMPointerTypeGet(MlirType pointee,
|
|
unsigned addressSpace);
|
|
|
|
/// Creates an llmv.void type.
|
|
MLIR_CAPI_EXPORTED MlirType mlirLLVMVoidTypeGet(MlirContext ctx);
|
|
|
|
/// Creates an llvm.array type.
|
|
MLIR_CAPI_EXPORTED MlirType mlirLLVMArrayTypeGet(MlirType elementType,
|
|
unsigned numElements);
|
|
|
|
/// Creates an llvm.func type.
|
|
MLIR_CAPI_EXPORTED MlirType
|
|
mlirLLVMFunctionTypeGet(MlirType resultType, intptr_t nArgumentTypes,
|
|
MlirType const *argumentTypes, bool isVarArg);
|
|
|
|
/// Creates an LLVM literal (unnamed) struct type.
|
|
MLIR_CAPI_EXPORTED MlirType
|
|
mlirLLVMStructTypeLiteralGet(MlirContext ctx, intptr_t nFieldTypes,
|
|
MlirType const *fieldTypes, bool isPacked);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // MLIR_C_DIALECT_LLVM_H
|