[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.
This commit is contained in:
parent
3537939cda
commit
4ab4398045
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue