[Mlir-commits] [mlir] [mlir] Notify rewriter listeners when hoisting constants (PR #233776)
Mehdi Amini
llvmlistbot at llvm.org
Tue Oct 20 15:56:29 PDT 2026
================
@@ -33,20 +34,19 @@ struct TestSingleFold : public PassWrapper<TestSingleFold, OperationPass<>>,
StringRef getDescription() const final {
return "Test single-pass operation folding and dead constant elimination";
}
- // All constants in the operation post folding.
- SmallVector<Operation *> existingConstants;
+ // Moves can report the same constant more than once. Keep each constant
+ // once so that cleanup cannot visit an operation after erasing it.
+ llvm::SmallSetVector<Operation *, 8> existingConstants;
----------------
joker-eph wrote:
Oh it's no longer a vector, it's a set-vector... never mind.
https://github.com/llvm/llvm-project/pull/233776
More information about the Mlir-commits
mailing list