[Mlir-commits] [mlir] [MLIR] Fix LLVMIRTransforms build failure (PR #125485)
Thomas Preud'homme
llvmlistbot at llvm.org
Mon Feb 10 10:26:58 PST 2025
https://github.com/RoboTux updated https://github.com/llvm/llvm-project/pull/125485
>From b08dbce4aa175295154a15a5adbd561c924bfc14 Mon Sep 17 00:00:00 2001
From: Thomas Preud'homme <thomas.preudhomme at arm.com>
Date: Fri, 31 Jan 2025 23:10:52 +0000
Subject: [PATCH] [MLIR] Fix LLVMIRTransforms build failure
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.
---
mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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