Pass the LLVMTypeConverter by reference in UnrankedMemRefBuilder (NFC)

This is a fairly large structure (952B according to Coverity), it was
already passed by reference in most places but not consistently.
This commit is contained in:
Mehdi Amini
2022-01-01 02:01:41 +00:00
parent bb6109aae6
commit 07b264d1f0
2 changed files with 2 additions and 2 deletions

View File

@@ -219,7 +219,7 @@ public:
LLVM::LLVMPointerType elemPtrPtrType);
/// Builds IR extracting the size[index] from the descriptor.
static Value size(OpBuilder &builder, Location loc,
LLVMTypeConverter typeConverter, Value sizeBasePtr,
LLVMTypeConverter &typeConverter, Value sizeBasePtr,
Value index);
/// Builds IR inserting the size[index] into the descriptor.
static void setSize(OpBuilder &builder, Location loc,

View File

@@ -478,7 +478,7 @@ Value UnrankedMemRefDescriptor::sizeBasePtr(
}
Value UnrankedMemRefDescriptor::size(OpBuilder &builder, Location loc,
LLVMTypeConverter typeConverter,
LLVMTypeConverter &typeConverter,
Value sizeBasePtr, Value index) {
Type indexPtrTy = LLVM::LLVMPointerType::get(typeConverter.getIndexType());
Value sizeStoreGep = builder.create<LLVM::GEPOp>(loc, indexPtrTy, sizeBasePtr,