[Mlir-commits] [llvm] [mlir] [mlir] Add config for PDL (PR #69927)

Mehdi Amini llvmlistbot at llvm.org
Sat Dec 9 20:29:59 PST 2023


================
@@ -1,3 +1,14 @@
+set(LLVM_OPTIONAL_SOURCES ByteCode.cpp)
+
+if(MLIR_ENABLE_PDL)
+set(MLIRRewritePDLDeps
+  MLIRPDLDialect
+  MLIRPDLInterpDialect
+  MLIRPDLToPDLInterp)
+else()
+  set(MLIRRewritePDLDeps)
+endif()
+
----------------
joker-eph wrote:

Can we also handle `ByteCode.cpp` here instead of adding `#ifdef` in the code?

It could be its own library and MLIRRewrite could depend on it:

```
if(MLIR_ENABLE_PDL)
  add_mlir_library(MLIRRewriteBytecode
    ByteCode.cpp
  DEPENDS
    MLIRPDLDialect
    MLIRPDLInterpDialect
    MLIRPDLToPDLInterp)
else()
  add_mlir_library(MLIRRewriteBytecode)
endif()
```

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


More information about the Mlir-commits mailing list