[Mlir-commits] [mlir] 9fdd0df - [mlir][nfc] Rename `promoteMemRefDescriptors` to `promoteOperands`.
Alexander Belyaev
llvmlistbot at llvm.org
Wed Aug 5 11:25:10 PDT 2020
Author: Alexander Belyaev
Date: 2020-08-05T20:24:48+02:00
New Revision: 9fdd0df9497e5b74a3739e651d218c1251b8ef78
URL: https://github.com/llvm/llvm-project/commit/9fdd0df9497e5b74a3739e651d218c1251b8ef78
DIFF: https://github.com/llvm/llvm-project/commit/9fdd0df9497e5b74a3739e651d218c1251b8ef78.diff
LOG: [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
Added:
Modified:
mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h b/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
index a1b3ec44d3eb..43a1587f0353 100644
--- a/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
+++ b/mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
@@ -89,13 +89,13 @@ class LLVMTypeConverter : public TypeConverter {
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<Value, 4> 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<Value, 4> 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 5fa3f36e5793..9777071aa124 100644
--- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
+++ b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
@@ -2126,7 +2126,7 @@ struct CallOpInterfaceLowering : public ConvertOpToLLVMPattern<CallOpType> {
return failure();
}
- auto promoted = this->typeConverter.promoteMemRefDescriptors(
+ auto promoted = this->typeConverter.promoteOperands(
op->getLoc(), /*opOperands=*/op->getOperands(), operands, rewriter);
auto newOp = rewriter.create<LLVM::CallOp>(op->getLoc(), packedResult,
promoted, op->getAttrs());
@@ -3356,10 +3356,10 @@ Value LLVMTypeConverter::promoteOneMemRefDescriptor(Location loc, Value operand,
return allocated;
}
-SmallVector<Value, 4>
-LLVMTypeConverter::promoteMemRefDescriptors(Location loc, ValueRange opOperands,
- ValueRange operands,
- OpBuilder &builder) {
+SmallVector<Value, 4> LLVMTypeConverter::promoteOperands(Location loc,
+ ValueRange opOperands,
+ ValueRange operands,
+ OpBuilder &builder) {
SmallVector<Value, 4> promotedOperands;
promotedOperands.reserve(operands.size());
for (auto it : llvm::zip(opOperands, operands)) {
More information about the Mlir-commits
mailing list