[Mlir-commits] [mlir] 6fb51f5 - [MLIR] Default PDL off for dependency-only builds (#233108)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Oct 19 07:00:09 PDT 2026
Author: Mehdi Amini
Date: 2026-10-19T16:00:04+02:00
New Revision: 6fb51f5a4e7dea46d2f717d3bf949579d3f8d9ea
URL: https://github.com/llvm/llvm-project/commit/6fb51f5a4e7dea46d2f717d3bf949579d3f8d9ea
DIFF: https://github.com/llvm/llvm-project/commit/6fb51f5a4e7dea46d2f717d3bf949579d3f8d9ea.diff
LOG: [MLIR] Default PDL off for dependency-only builds (#233108)
Default PDL support in PatternMatch to off whenever MLIR is configured
only as a dependency. Keep the existing default for explicitly enabled
MLIR builds and preserve user-provided PDL settings. This speeds up
clang build with CIR enabled.
Assisted-by: Codex
Added:
Modified:
mlir/CMakeLists.txt
Removed:
################################################################################
diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt
index 68df5aed001e2..f2c9d29af17e4 100644
--- a/mlir/CMakeLists.txt
+++ b/mlir/CMakeLists.txt
@@ -151,7 +151,15 @@ set(MLIR_ENABLE_NVPTXCOMPILER 0 CACHE BOOL
"Statically link the nvptxlibrary instead of calling ptxas as a subprocess \
for compiling PTX to cubin")
-set(MLIR_ENABLE_PDL_IN_PATTERNMATCH 1 CACHE BOOL "Enable PDL in PatternMatch")
+# Avoid pulling PDL into builds that only use MLIR as a dependency.
+if("mlir" IN_LIST LLVM_DEPENDENCY_ONLY_PROJECTS)
+ set(MLIR_ENABLE_PDL_IN_PATTERNMATCH_default 0)
+else()
+ set(MLIR_ENABLE_PDL_IN_PATTERNMATCH_default 1)
+endif()
+set(MLIR_ENABLE_PDL_IN_PATTERNMATCH
+ ${MLIR_ENABLE_PDL_IN_PATTERNMATCH_default} CACHE BOOL
+ "Enable PDL in PatternMatch")
option(MLIR_INCLUDE_TESTS
"Generate build targets for the MLIR unit tests."
More information about the Mlir-commits
mailing list