[Mlir-commits] [mlir] Reapply "[mlir] NFC: fix dependence of (Tensor|Linalg|MemRef|Complex) dialects on LLVM Dialect and LLVM Core in CMake build (#104832)" (PR #105703)

Mehdi Amini llvmlistbot at llvm.org
Wed Aug 28 13:41:15 PDT 2024


================
@@ -379,8 +378,8 @@ LogicalResult ForLowering::matchAndRewrite(ForOp forOp,
   // llvm.loop_annotation attribute.
   SmallVector<NamedAttribute> llvmAttrs;
   llvm::copy_if(forOp->getAttrs(), std::back_inserter(llvmAttrs),
-                [](auto attr) {
-                  return isa<LLVM::LLVMDialect>(attr.getValue().getDialect());
+                [](NamedAttribute attr) {
+                  return attr.getValue().getDialect().getNamespace() == "llvm";
----------------
joker-eph wrote:

Using a string here looks like a bit of a hack to me :(

It's pretty unfortunate that we have to choose between a dependency and the feature here though.

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


More information about the Mlir-commits mailing list