[Mlir-commits] [mlir] [mlir]: Add handling of escaped memrefs to erase_dead_alloc_and_stores (PR #167255)
Matthias Springer
llvmlistbot at llvm.org
Sun Nov 9 15:50:51 PST 2025
================
@@ -140,6 +140,9 @@ static bool resultIsNotRead(Operation *op, std::vector<Operation *> &uses) {
std::vector<Operation *> opUses;
for (OpOperand &use : op->getUses()) {
Operation *useOp = use.getOwner();
+ // Use escaped the scope
+ if (useOp->hasTrait<mlir::OpTrait::ReturnLike>())
----------------
matthias-springer wrote:
Can you change this into `mightHaveTrait<OpTrait::IsTerminator>`? Then it would also covert ops such as `cf.br`.
https://github.com/llvm/llvm-project/pull/167255
More information about the Mlir-commits
mailing list