llvm / circt

Circuit IR Compilers and Tools
https://circt.org
Other
1.57k stars 277 forks source link

[FIRRTL] SpecializeLayers: fix race condition #7218

Closed youngar closed 1 week ago

youngar commented 1 week ago

This pass processes all modules and layers in parallel, and since this could result in the operation being deleted, could lead to crash when two side-by-side ops are removed at the same time and try to modify each other's next and previous pointers. This changes the pass to handle the part of the specialization which can delete the operation in serial.