mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
Bugfix: Keep worklistMap in sync with worklist in GreedyPatternRewriter
When we removed a pattern, we removed it from worklist but not from worklistMap. Then, when we tried to add a new pattern on the same Operation again, the pattern wasn't added since it already existed in the worklistMap (but not in the worklist). Closes tensorflow/mlir#211 PiperOrigin-RevId: 277319669
This commit is contained in:
committed by
A. Unique TensorFlower
parent
8656af1e82
commit
c87c7f5732
@@ -79,6 +79,7 @@ public:
|
||||
if (it != worklistMap.end()) {
|
||||
assert(worklist[it->second] == op && "malformed worklist data structure");
|
||||
worklist[it->second] = nullptr;
|
||||
worklistMap.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user