[Mlir-commits] [mlir] 4ab4398 - [mlir] minor tweaks in standard-to-llvm lowering
Alex Zinenko
llvmlistbot at llvm.org
Tue Jun 30 12:19:27 PDT 2020
Author: Alex Zinenko
Date: 2020-06-30T21:19:19+02:00
New Revision: 4ab43980450baf3c49bebbc526c6c96c3ed9f06e
URL: https://github.com/llvm/llvm-project/commit/4ab43980450baf3c49bebbc526c6c96c3ed9f06e
DIFF: https://github.com/llvm/llvm-project/commit/4ab43980450baf3c49bebbc526c6c96c3ed9f06e.diff
LOG: [mlir] minor tweaks in standard-to-llvm lowering
Fix a typo in the documentation and simplify the condition to drop
braces. Addresses post-commit review of https://reviews.llvm.org/D82647.
Added:
Modified:
mlir/docs/ConversionToLLVMDialect.md
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
Removed:
################################################################################
diff --git a/mlir/docs/ConversionToLLVMDialect.md b/mlir/docs/ConversionToLLVMDialect.md
index e65df4444b80..27b732015f9f 100644
--- a/mlir/docs/ConversionToLLVMDialect.md
+++ b/mlir/docs/ConversionToLLVMDialect.md
@@ -378,7 +378,7 @@ to function-length lifetime, creation of multiple unranked memref descriptors,
e.g., in a loop, may lead to stack overflows.) If an unranked descriptor has to
be returned from a function, the ranked descriptor it points to is copied into
dynamically allocated memory, and the pointer in the unranked descriptor is
-updated accodingly. The allocation happens immediately before returning. It is
+updated accordingly. The allocation happens immediately before returning. It is
the responsibility of the caller to free the dynamically allocated memory. The
default conversion of `std.call` and `std.call_indirect` copies the ranked
descriptor to newly allocated memory on the caller's stack. Thus, the convention
diff --git a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
index b6900d13094c..ee98bc9166f8 100644
--- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
+++ b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
@@ -1955,11 +1955,9 @@ static LogicalResult copyUnrankedDescriptors(OpBuilder &builder, Location loc,
// Find operands of unranked memref type and store them.
SmallVector<UnrankedMemRefDescriptor, 4> unrankedMemrefs;
- for (unsigned i = 0, e = operands.size(); i < e; ++i) {
- if (!origTypes[i].isa<UnrankedMemRefType>())
- continue;
- unrankedMemrefs.emplace_back(operands[i]);
- }
+ for (unsigned i = 0, e = operands.size(); i < e; ++i)
+ if (origTypes[i].isa<UnrankedMemRefType>())
+ unrankedMemrefs.emplace_back(operands[i]);
if (unrankedMemrefs.empty())
return success();
More information about the Mlir-commits
mailing list