-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MLIR] Remove unneeded LLVMDialect.h include in ControlFlowToSCF.cpp #113560
[MLIR] Remove unneeded LLVMDialect.h include in ControlFlowToSCF.cpp #113560
Conversation
@llvm/pr-subscribers-mlir Author: Thomas Preud'homme (RoboTux) ChangesThis fixes the following failure when doing a clean build (in particular
Full diff: https://github.com/llvm/llvm-project/pull/113560.diff 1 Files Affected:
diff --git a/mlir/lib/Conversion/ControlFlowToSCF/CMakeLists.txt b/mlir/lib/Conversion/ControlFlowToSCF/CMakeLists.txt
index e2f1677b1d0695..9a3f2dfc3799fd 100644
--- a/mlir/lib/Conversion/ControlFlowToSCF/CMakeLists.txt
+++ b/mlir/lib/Conversion/ControlFlowToSCF/CMakeLists.txt
@@ -12,6 +12,7 @@ add_mlir_conversion_library(MLIRControlFlowToSCF
MLIRArithDialect
MLIRControlFlowDialect
MLIRFuncDialect
+ MLIRLLVMDialect
MLIRSCFDialect
MLIRUBDialect
MLIRPass
|
There shouldn't be any dependency on the LLVM dialect in that pass that I am aware of, so I'd much rather remove the include than add a false library dependency. This seems to also be what was done in #104832 but was seemingly reverted for unrelated reasons. |
The proper fix would be an interface I think, the commit you mention is using a string to work around, but that looks a bit like a hack to me. |
I think you may be mixing the changes done to Fully agree otherwise. |
This fixes the following failure when doing a clean build (in particular no .ninja* lying around) of lib/libMLIRControlFlowToSCF.a only: ``` In file included from llvm/include/llvm/IR/Module.h:22, from mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h:37, from mlir/lib/Conversion/ControlFlowToSCF/ControlFlowToSCF.cpp:19 llvm/include/llvm/IR/Attributes.h:90:14: fatal error: llvm/IR/Attributes.inc: No such file or directory ```
16dd901
to
ee01150
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…lvm#113560) This fixes the following failure when doing a clean build (in particular no .ninja* lying around) of lib/libMLIRControlFlowToSCF.a only: ``` In file included from llvm/include/llvm/IR/Module.h:22, from mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h:37, from mlir/lib/Conversion/ControlFlowToSCF/ControlFlowToSCF.cpp:19 llvm/include/llvm/IR/Attributes.h:90:14: fatal error: llvm/IR/Attributes.inc: No such file or directory ```
This fixes the following failure when doing a clean build (in particular
no .ninja* lying around) of lib/libMLIRControlFlowToSCF.a only: