Skip to content

Commit c7da210

Browse files
address reviews
1 parent bd10462 commit c7da210

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

mlir/include/mlir/Conversion/LLVMCommon/Pattern.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ class ConvertToLLVMPattern : public ConversionPattern {
7676
ConversionPatternRewriter &rewriter) const;
7777

7878
/// Returns if the given memref type is convertible to LLVM and has an
79-
/// identity layout map. If `verifyMemorySpace` is set to "false", the memory
80-
/// space of the memref type is ignored.
81-
bool isConvertibleAndHasIdentityMaps(MemRefType type,
82-
bool verifyMemorySpace = true) const;
79+
/// identity layout map.
80+
bool isConvertibleAndHasIdentityMaps(MemRefType type) const;
8381

8482
/// Returns the type of a pointer to an element of the memref.
8583
Type getElementPtrType(MemRefType type) const;

mlir/lib/Conversion/LLVMCommon/Pattern.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,10 @@ Value ConvertToLLVMPattern::getStridedElementPtr(
9898
// Check if the MemRefType `type` is supported by the lowering. We currently
9999
// only support memrefs with identity maps.
100100
bool ConvertToLLVMPattern::isConvertibleAndHasIdentityMaps(
101-
MemRefType type, bool verifyMemorySpace) const {
101+
MemRefType type) const {
102102
if (!type.getLayout().isIdentity())
103103
return false;
104-
// If the memory space should not be verified, just check the element type.
105-
Type typeToVerify =
106-
verifyMemorySpace ? static_cast<Type>(type) : type.getElementType();
107-
return static_cast<bool>(typeConverter->convertType(typeToVerify));
104+
return static_cast<bool>(typeConverter->convertType(type));
108105
}
109106

110107
Type ConvertToLLVMPattern::getElementPtrType(MemRefType type) const {

0 commit comments

Comments
 (0)