[Mlir-commits] [mlir] [mlir][llvm] Add support for memset.inline (PR #115711)
Théo Degioanni
llvmlistbot at llvm.org
Mon Nov 11 15:39:22 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 {
+template <class MemsetLike>
+void createMemsetLenAttr(MemsetLike op, IntegerAttr &memsetLenAttr) {
----------------
Moxinilian wrote:
nit: I'd rather have this return the IntegerAttr. Just a style thing (`createXYZ` should return the `XYZ` when possible imo).
https://github.com/llvm/llvm-project/pull/115711
More information about the Mlir-commits
mailing list