[Mlir-commits] [mlir] d7fd2a2 - [MLIR] Fix LLVMIRTransforms build failure (#125485)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Feb 10 11:38:02 PST 2025


Author: Thomas Preud'homme
Date: 2025-02-10T19:37:58Z
New Revision: d7fd2a2a3befe451d3cc70612a40e8c90a780caf

URL: https://github.com/llvm/llvm-project/commit/d7fd2a2a3befe451d3cc70612a40e8c90a780caf
DIFF: https://github.com/llvm/llvm-project/commit/d7fd2a2a3befe451d3cc70612a40e8c90a780caf.diff

LOG: [MLIR] Fix LLVMIRTransforms build failure (#125485)

lib/libMLIRLLVMIRTransforms.a fails to build from scratch with the
following error:
In file included from llvm/include/llvm/Frontend/OpenMP/OMPConstants.h:19,
                 from llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:19,
                 from mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h:26,
                 from mlir/include/mlir/Dialect/LLVMIR/NVVMDialect.h:24,
                 from mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp:17:
llvm/include/llvm/Frontend/OpenMP/OMP.h:16:10:
fatal error: llvm/Frontend/OpenMP/OMP.h.inc: No such file or directory

Use a forward declaration for OpenMPIRBuilder in ModuleTranslation.h to
avoid pulling OpenMP frontend header that require generated headers.

Added: 
    

Modified: 
    mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h b/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
index ec6182fb34413fb..9de1d29fa8ec8fb 100644
--- a/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
+++ b/mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
@@ -23,12 +23,13 @@
 #include "mlir/Target/LLVMIR/TypeToLLVM.h"
 
 #include "llvm/ADT/SetVector.h"
-#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
+#include "llvm/IR/FPEnv.h"
 
 namespace llvm {
 class BasicBlock;
-class IRBuilderBase;
 class Function;
+class IRBuilderBase;
+class OpenMPIRBuilder;
 class Value;
 } // namespace llvm
 


        


More information about the Mlir-commits mailing list