Skip to content

[MLIR] Add missing MLIRFuncDialect dep to MLIRAffineAnalysis #84555

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

Closed

Conversation

RoboTux
Copy link
Contributor

@RoboTux RoboTux commented Mar 8, 2024

This fixes the following failure when doing a clean build (in particular
no .ninja* lying around) of lib/libMLIRAffineAnalysis.a only:

In file included from mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp:20:
mlir/include/mlir/Dialect/Func/IR/FuncOps.h:29:10: fatal error: mlir/Dialect/Func/IR/FuncOps.h.inc: No such file or directory

Note: lib/libMLIRAffineAnalysis.a does build successfully in Ninja
without this patch. The missing dependency was discovered when
converting the CMake build system to bob which put output for each
target in their own build directory. A missing dependency will thus fail
because even though the target dep might be built indirectly, the
path to the dep will not be added to the include path and files are not
found when building the target.
@llvmbot
Copy link
Member

llvmbot commented Mar 8, 2024

@llvm/pr-subscribers-mlir

Author: Thomas Preud'homme (RoboTux)

Changes

Note: lib/libMLIRAffineAnalysis.a does build successfully in Ninja
without this patch. The missing dependency was discovered when
converting the CMake build system to bob which put output for each
target in their own build directory. A missing dependency will thus fail
because even though the target dep might be built indirectly, the
path to the dep will not be added to the include path and files are not
found when building the target.


Full diff: https://github.com/llvm/llvm-project/pull/84555.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt (+1)
diff --git a/mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt b/mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt
index 61e49b0da8b2d0..3210d88c260035 100644
--- a/mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt
@@ -14,6 +14,7 @@ add_mlir_dialect_library(MLIRAffineAnalysis
   MLIRCallInterfaces
   MLIRControlFlowInterfaces
   MLIRDialectUtils
+  MLIRFuncDialect
   MLIRInferTypeOpInterface
   MLIRSideEffectInterfaces
   MLIRPresburger

@llvmbot
Copy link
Member

llvmbot commented Mar 8, 2024

@llvm/pr-subscribers-mlir-affine

Author: Thomas Preud'homme (RoboTux)

Changes

Note: lib/libMLIRAffineAnalysis.a does build successfully in Ninja
without this patch. The missing dependency was discovered when
converting the CMake build system to bob which put output for each
target in their own build directory. A missing dependency will thus fail
because even though the target dep might be built indirectly, the
path to the dep will not be added to the include path and files are not
found when building the target.


Full diff: https://github.com/llvm/llvm-project/pull/84555.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt (+1)
diff --git a/mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt b/mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt
index 61e49b0da8b2d0..3210d88c260035 100644
--- a/mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/Analysis/CMakeLists.txt
@@ -14,6 +14,7 @@ add_mlir_dialect_library(MLIRAffineAnalysis
   MLIRCallInterfaces
   MLIRControlFlowInterfaces
   MLIRDialectUtils
+  MLIRFuncDialect
   MLIRInferTypeOpInterface
   MLIRSideEffectInterfaces
   MLIRPresburger

@joker-eph
Copy link
Collaborator

Can you add the failure to the description? (for this PR and all the other similar fixes)

I don't reproduce at head with ninja clean && ninja lib/libMLIRAffineAnalysis.a right now.

@RoboTux
Copy link
Contributor Author

RoboTux commented Mar 19, 2024

Ping?

@matthias-springer
Copy link
Member

Can you try to remove the FuncOps.h include from AffineAnalysis.cpp instead? I don't see any uses of func dialect ops in that file.

@RoboTux
Copy link
Contributor Author

RoboTux commented Mar 20, 2024

It worked, I've created a new PR since this is a different patch: #85912.

Closing this one.

@RoboTux RoboTux closed this Mar 20, 2024
@RoboTux RoboTux deleted the affineanalysis_missing_funcdialect branch April 18, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants