[Mlir-commits] [mlir] [MLIR] Preserve operand segment sizes when removing dead inputs (PR #223154)

Ivan Butygin llvmlistbot at llvm.org
Sun Sep 13 03:04:26 PDT 2026


================
@@ -1150,6 +1150,16 @@ struct OperationState {
   MLIRContext *getContext() const { return location->getContext(); }
 };
 
+//===----------------------------------------------------------------------===//
+// Operand mutation
+//===----------------------------------------------------------------------===//
+
+/// Erase the operands selected by `eraseIndices` and update operandSegmentSizes
+/// if the operation has AttrSizedOperandSegments. The bit vector must have one
+/// entry for each original operand. The caller must select operands that the
+/// operation permits removing and update any other dependent metadata.
+void eraseOperands(Operation *op, const BitVector &eraseIndices);
----------------
Hardcode84 wrote:

done

https://github.com/llvm/llvm-project/pull/223154


More information about the Mlir-commits mailing list