[Mlir-commits] [mlir] [MLIR][OpenMP] Remove OpenMPDialectFoldInterface (PR #97577)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jul 3 06:50:31 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-openmp
Author: Sergio Afonso (skatrak)
<details>
<summary>Changes</summary>
The `OpenMPDialectFoldInterface` was originally introduced to prevent constants from being hoisted out of `omp.target` regions. This hasn't been necessary since the `IsolatedFromAbove` trait was added to that operation, so it's safe to remove this interface.
---
Full diff: https://github.com/llvm/llvm-project/pull/97577.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp (-10)
``````````diff
diff --git a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
index abbd857dad67a..ba29e564afc2c 100644
--- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -66,15 +66,6 @@ struct LLVMPointerPointerLikeModel
LLVM::LLVMPointerType> {
Type getElementType(Type pointer) const { return Type(); }
};
-
-struct OpenMPDialectFoldInterface : public DialectFoldInterface {
- using DialectFoldInterface::DialectFoldInterface;
-
- bool shouldMaterializeInto(Region *region) const final {
- // Avoid folding constants across target regions
- return isa<TargetOp>(region->getParentOp());
- }
-};
} // namespace
void OpenMPDialect::initialize() {
@@ -91,7 +82,6 @@ void OpenMPDialect::initialize() {
#include "mlir/Dialect/OpenMP/OpenMPOpsTypes.cpp.inc"
>();
- addInterface<OpenMPDialectFoldInterface>();
MemRefType::attachInterface<MemRefPointerLikeModel>(*getContext());
LLVM::LLVMPointerType::attachInterface<LLVMPointerPointerLikeModel>(
*getContext());
``````````
</details>
https://github.com/llvm/llvm-project/pull/97577
More information about the Mlir-commits
mailing list