The code in PhiAssign::convertToAssign (Cf. #23) is currently less than ideal. Constructing the Assign in-place may cause crashes if other code still holds a pointer to the phi. Therefore, the code should be refactored/fixed to replace the statement (not in-place). References to the old Phi (subscripts, RHSes of other Phis, collectors) also need to be replaced to point to the new Assign.
Solving this is a prerequisite for using smart pointers for managing the lifetime of Statements (also #23)
The code in
PhiAssign::convertToAssign
(Cf. #23) is currently less than ideal. Constructing the Assign in-place may cause crashes if other code still holds a pointer to the phi. Therefore, the code should be refactored/fixed to replace the statement (not in-place). References to the oldPhi
(subscripts, RHSes of otherPhi
s, collectors) also need to be replaced to point to the newAssign
.Solving this is a prerequisite for using smart pointers for managing the lifetime of
Statement
s (also #23)