[clang] [CIR] Add TargetLowering pass (PR #179245)

Sirui Mu via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 4 05:59:57 PST 2026


================
@@ -3339,7 +3315,8 @@ void ConvertCIRToLLVMPass::runOnOperation() {
   mlir::ModuleOp module = getOperation();
   mlir::DataLayout dl(module);
   mlir::LLVMTypeConverter converter(&getContext());
-  std::unique_ptr<cir::LowerModule> lowerModule = prepareLowerModule(module);
+  std::unique_ptr<cir::LowerModule> lowerModule =
----------------
Lancern wrote:

No, `LowerModule` should no longer be needed in `LowerToLLVM`.

But I plan to make this PR as simple as possible. Removing `LowerModule` from `LowerToLLVM` requires non-trivial amount of work (e.g. you have to update the TableGen backend as well because `LowerModule` is included in every `CIRToLLVMXxxOpLowering` pattern) so I decide to do it in a later PR.

https://github.com/llvm/llvm-project/pull/179245


More information about the cfe-commits mailing list