Skip to content

Commit 3b904d5

Browse files
ChuanqiXu9lanza
authored andcommitted
[ClangIR][Lowering][NFC] Split LowerToLLVM.h from LowerToLLVM.cpp (#1102)
This is a NFC patch that moves declaration from LowerToLLVM.cpp. The motivation of the patch is, we hope we can use the abilities from MLIR's standard dialects without lowering **ALL** clangir operation to MLIR's standard dialects. For example, currently we have 86 operations in LowerToLLVM.cpp but only 45 operations under though MLIR. It won't be easy to add proper lowering for all operation to **different** dialects. I think the solution may be to allow **mixed** IR. So that we can lowering CIR to MLIR's standard dialects partially and we can use some existing analysis and optimizations in MLIR and then we can lower all of them (the MLIR dialects and unlowered clangir) to LLVM IR. The hybrid IR is one of the goals of MLIR as far as I know. NOTE: I completely understand that the DirectlyLLVM pipeline is the tier-1 pipeline that we want to support. The idea above won't change this. I just want to offer some oppotunities for the downstream projects and finally some chances to improve the overall ecosystem.
1 parent 33d8963 commit 3b904d5

File tree

3 files changed

+3712
-3225
lines changed

3 files changed

+3712
-3225
lines changed

0 commit comments

Comments
 (0)