The attribute jump_target of BasicBlock class is mutated over the course of various transformations, this leads to the blocks being rebuilt and the SCFG being deep copied every time a transformation is applied.
It should be made a mutable property of the SCFG class instead of an immutable property of the BasicBlock frozen data class. This will prevent unnecessary copies.
The attribute
jump_target
ofBasicBlock
class is mutated over the course of various transformations, this leads to the blocks being rebuilt and the SCFG being deep copied every time a transformation is applied.It should be made a mutable property of the SCFG class instead of an immutable property of the
BasicBlock
frozen data class. This will prevent unnecessary copies.