From 9fdd0df9497e5b74a3739e651d218c1251b8ef78 Mon Sep 17 00:00:00 2001 From: Alexander Belyaev Date: Wed, 5 Aug 2020 18:41:29 +0200 Subject: [PATCH] [mlir][nfc] Rename `promoteMemRefDescriptors` to `promoteOperands`. `promoteMemRefDescriptors` also converts types of every operand, not only memref-typed ones. I think `promoteMemRefDescriptors` name does not imply that. Differential Revision: https://reviews.llvm.org/D85325 --- .../mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h | 14 +++++++------- mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h b/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h index a1b3ec4..43a1587 100644 --- a/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h +++ b/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h @@ -89,13 +89,13 @@ public: const LowerToLLVMOptions &getOptions() const { return options; } - /// Promote the LLVM struct representation of all MemRef descriptors to stack - /// and use pointers to struct to avoid the complexity of the - /// platform-specific C/C++ ABI lowering related to struct argument passing. - SmallVector promoteMemRefDescriptors(Location loc, - ValueRange opOperands, - ValueRange operands, - OpBuilder &builder); + /// Promote the LLVM representation of all operands including promoting MemRef + /// descriptors to stack and use pointers to struct to avoid the complexity + /// of the platform-specific C/C++ ABI lowering related to struct argument + /// passing. + SmallVector promoteOperands(Location loc, ValueRange opOperands, + ValueRange operands, + OpBuilder &builder); /// Promote the LLVM struct representation of one MemRef descriptor to stack /// and use pointer to struct to avoid the complexity of the platform-specific diff --git a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp index 5fa3f36..9777071 100644 --- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp +++ b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp @@ -2126,7 +2126,7 @@ struct CallOpInterfaceLowering : public ConvertOpToLLVMPattern { return failure(); } - auto promoted = this->typeConverter.promoteMemRefDescriptors( + auto promoted = this->typeConverter.promoteOperands( op->getLoc(), /*opOperands=*/op->getOperands(), operands, rewriter); auto newOp = rewriter.create(op->getLoc(), packedResult, promoted, op->getAttrs()); @@ -3356,10 +3356,10 @@ Value LLVMTypeConverter::promoteOneMemRefDescriptor(Location loc, Value operand, return allocated; } -SmallVector -LLVMTypeConverter::promoteMemRefDescriptors(Location loc, ValueRange opOperands, - ValueRange operands, - OpBuilder &builder) { +SmallVector LLVMTypeConverter::promoteOperands(Location loc, + ValueRange opOperands, + ValueRange operands, + OpBuilder &builder) { SmallVector promotedOperands; promotedOperands.reserve(operands.size()); for (auto it : llvm::zip(opOperands, operands)) { -- 2.7.4