[Mlir-commits] [clang] [mlir] [CIR][OpenMP] Add host op filtering pass to CIR pipeline (PR #209592)

Sergio Afonso llvmlistbot at llvm.org
Thu Jul 16 04:15:05 PDT 2026


================
@@ -5130,22 +5130,25 @@ std::unique_ptr<mlir::Pass> createConvertCIRToLLVMPass() {
   return std::make_unique<ConvertCIRToLLVMPass>();
 }
 
-void populateCIRToLLVMPasses(mlir::OpPassManager &pm) {
+void populateCIRToLLVMPasses(mlir::OpPassManager &pm, bool enableOpenMP) {
   mlir::populateCIRPreLoweringPasses(pm);
-  pm.addPass(mlir::omp::createMarkDeclareTargetPass());
+  if (enableOpenMP)
+    pm.addPass(mlir::omp::createMarkDeclareTargetPass());
----------------
skatrak wrote:

Not a change request for this patch, only a related comment: I see there's no function filtering between this and the host op filtering pass. Is the plan to handle that in CIR or in LLVM dialect? The question here is mostly to figure out whether we might want to move that pass to the omp dialect as well.

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


More information about the Mlir-commits mailing list