Skip to content

Commit 9fdd0df

Browse files
committed
[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
1 parent 2918727 commit 9fdd0df

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ class LLVMTypeConverter : public TypeConverter {
8989

9090
const LowerToLLVMOptions &getOptions() const { return options; }
9191

92-
/// Promote the LLVM struct representation of all MemRef descriptors to stack
93-
/// and use pointers to struct to avoid the complexity of the
94-
/// platform-specific C/C++ ABI lowering related to struct argument passing.
95-
SmallVector<Value, 4> promoteMemRefDescriptors(Location loc,
96-
ValueRange opOperands,
97-
ValueRange operands,
98-
OpBuilder &builder);
92+
/// Promote the LLVM representation of all operands including promoting MemRef
93+
/// descriptors to stack and use pointers to struct to avoid the complexity
94+
/// of the platform-specific C/C++ ABI lowering related to struct argument
95+
/// passing.
96+
SmallVector<Value, 4> promoteOperands(Location loc, ValueRange opOperands,
97+
ValueRange operands,
98+
OpBuilder &builder);
9999

100100
/// Promote the LLVM struct representation of one MemRef descriptor to stack
101101
/// and use pointer to struct to avoid the complexity of the platform-specific

mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,7 +2126,7 @@ struct CallOpInterfaceLowering : public ConvertOpToLLVMPattern<CallOpType> {
21262126
return failure();
21272127
}
21282128

2129-
auto promoted = this->typeConverter.promoteMemRefDescriptors(
2129+
auto promoted = this->typeConverter.promoteOperands(
21302130
op->getLoc(), /*opOperands=*/op->getOperands(), operands, rewriter);
21312131
auto newOp = rewriter.create<LLVM::CallOp>(op->getLoc(), packedResult,
21322132
promoted, op->getAttrs());
@@ -3356,10 +3356,10 @@ Value LLVMTypeConverter::promoteOneMemRefDescriptor(Location loc, Value operand,
33563356
return allocated;
33573357
}
33583358

3359-
SmallVector<Value, 4>
3360-
LLVMTypeConverter::promoteMemRefDescriptors(Location loc, ValueRange opOperands,
3361-
ValueRange operands,
3362-
OpBuilder &builder) {
3359+
SmallVector<Value, 4> LLVMTypeConverter::promoteOperands(Location loc,
3360+
ValueRange opOperands,
3361+
ValueRange operands,
3362+
OpBuilder &builder) {
33633363
SmallVector<Value, 4> promotedOperands;
33643364
promotedOperands.reserve(operands.size());
33653365
for (auto it : llvm::zip(opOperands, operands)) {

0 commit comments

Comments
 (0)