mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 00:20:25 +08:00
[MLIR][OpenMP] Remove OpenMPDialectFoldInterface (#97577)
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.
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user