[Mlir-commits] [mlir] [mlir][llvm] Add support for memset.inline (PR #115711)
Tobias Gysi
llvmlistbot at llvm.org
Mon Nov 11 08:21:05 PST 2024
================
@@ -988,62 +1012,74 @@ bool LLVM::MemsetOp::canUsesBeRemoved(
if (!canConvertType)
return false;
- if (getIsVolatile())
+ if (op.getIsVolatile())
return false;
- return getStaticMemIntrLen(*this) == dataLayout.getTypeSize(slot.elemType);
+ return getStaticMemIntrLen(op) == dataLayout.getTypeSize(slot.elemType);
}
-
-DeletionKind LLVM::MemsetOp::removeBlockingUses(
- const MemorySlot &slot, const SmallPtrSetImpl<OpOperand *> &blockingUses,
- OpBuilder &builder, Value reachingDefinition,
- const DataLayout &dataLayout) {
- return DeletionKind::Delete;
+namespace {
----------------
gysit wrote:
```suggestion
namespace {
```
nit: Add newline
Also would it make sense to move this helper in the same global namespace as getStaticMemIntrLen? Also add a small comment if possible. Usually all non-trivial functions should have a small doc string. Here it seems ok to omit the comments for the functions that reimplement an interface function, since these ones already have comments.
https://github.com/llvm/llvm-project/pull/115711
More information about the Mlir-commits
mailing list