[Mlir-commits] [flang] [mlir] [MLIR][LLVMIR][DLTI] Add #llvm.target, #llvm.data_layout and TargetAttrInterface (PR #145899)

Fabian Mora llvmlistbot at llvm.org
Wed Jul 9 10:07:43 PDT 2025


================
@@ -14,8 +14,10 @@
 #ifndef MLIR_DIALECT_LLVMIR_LLVMATTRS_H_
 #define MLIR_DIALECT_LLVMIR_LLVMATTRS_H_
 
-#include "mlir/Dialect/LLVMIR/LLVMTypes.h"
 #include "mlir/IR/OpImplementation.h"
+#include "mlir/Interfaces/DataLayoutInterfaces.h"
+#include "llvm/MC/TargetRegistry.h"
+#include "llvm/Target/TargetMachine.h"
----------------
fabianmcg wrote:

This is adding a lot of LLVM deps to the LLVM dialect that we don't want. The best way to remove this dep is add a promised interface and implement  `LLVM_TargetAttrInterface` for that attr as an external model in `mlir/lib/Target`.

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


More information about the Mlir-commits mailing list