llvm / clangir

A new (MLIR based) high-level IR for clang.
https://clangir.org
Other
308 stars 84 forks source link

[CIR][Pipeline] Support -fclangir-analysis-only #638

Closed ChuanqiXu9 closed 1 month ago

ChuanqiXu9 commented 1 month ago

Close https://github.com/llvm/clangir/issues/633.

This patch introduces -fclangir-analysis-only option to allow the users to consume the AST to the CIR (and potential analysis passes, this can be done by specifying -Xclang -fclangir-lifetime-check="" now or some default value in following patches) and also generating the LLVM IR by the traditional code gen path. This will be helpful to use CIR with real world projects without worrying the correctness and completeness of CIR CodeGen part.

ChuanqiXu9 commented 1 month ago

It shows it has conflicts but I just rebased to main

bcardosolopes commented 1 month ago

I'll merge as soon as the conflicts are fixed.

It shows it has conflicts but I just rebased to main

It conflicts with something that landed more or less about the time you updated, shall work if you do it again.

ChuanqiXu9 commented 1 month ago

Done