[PATCH] D76415: [mlir] Fix unsafe create operation in GreedyPatternRewriter
Mahesh Ravishankar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 19 09:45:57 PDT 2020
mravishankar marked 4 inline comments as done.
mravishankar added inline comments.
================
Comment at: mlir/include/mlir/Transforms/FoldUtils.h:87
+ op->destroy();
+ }
}
----------------
mehdi_amini wrote:
> I think that is similar to what River mentions above, but this code is fishy: if none of the branch is taken the op just leaks.
>
> I'd write it with early exit so that there is a clear handling of the "fallback" path.
I changed it. I think the logic now maps to what River suggested. Something is off though. Test failing (maybe another issue exposed by this). Looking into those.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76415/new/
https://reviews.llvm.org/D76415
More information about the llvm-commits
mailing list