Skip to content

Commit 55e9a9b

Browse files
committed
init conversion to llvm
1 parent 9155f51 commit 55e9a9b

File tree

6 files changed

+805
-0
lines changed

6 files changed

+805
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//===- PtrToLLVM.h - Ptr to LLVM dialect conversion -------------*- 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+
#ifndef MLIR_CONVERSION_PTRTOLLVM_PTRTOLLVM_H
10+
#define MLIR_CONVERSION_PTRTOLLVM_PTRTOLLVM_H
11+
12+
#include <memory>
13+
14+
namespace mlir {
15+
class DialectRegistry;
16+
class LLVMTypeConverter;
17+
class RewritePatternSet;
18+
namespace ptr {
19+
/// Populate the convert to LLVM patterns for the `ptr` dialect.
20+
void populatePtrToLLVMConversionPatterns(LLVMTypeConverter &converter,
21+
RewritePatternSet &patterns);
22+
/// Register the convert to LLVM interface for the `ptr` dialect.
23+
void registerConvertPtrToLLVMInterface(DialectRegistry &registry);
24+
} // namespace ptr
25+
} // namespace mlir
26+
27+
#endif // MLIR_CONVERSION_PTRTOLLVM_PTRTOLLVM_H

mlir/lib/Conversion/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ add_subdirectory(NVVMToLLVM)
5050
add_subdirectory(OpenACCToSCF)
5151
add_subdirectory(OpenMPToLLVM)
5252
add_subdirectory(PDLToPDLInterp)
53+
add_subdirectory(PtrToLLVM)
5354
add_subdirectory(ReconcileUnrealizedCasts)
5455
add_subdirectory(SCFToControlFlow)
5556
add_subdirectory(SCFToEmitC)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
add_mlir_conversion_library(MLIRPtrToLLVM
2+
PtrToLLVM.cpp
3+
4+
ADDITIONAL_HEADER_DIRS
5+
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/PtrToLLVM
6+
7+
DEPENDS
8+
MLIRConversionPassIncGen
9+
10+
LINK_COMPONENTS
11+
Core
12+
13+
LINK_LIBS PUBLIC
14+
MLIRPtrDialect
15+
MLIRLLVMCommonConversion
16+
MLIRLLVMDialect
17+
)

0 commit comments

Comments
 (0)