You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A serialization/deepcopy of a psyir tree is currently not possible.
Using copy.deepcopy on certain files leads, e.g., to this error message:
File "[...]/src/psyclone/psyir/nodes/node.py", line 162, in _check_is_orphan
raise GenerationError(
psyclone.errors.GenerationError: Generation Error: Item 'Reference' can't be added as child of 'Assignment' because it is not an orphan. It already has a 'Assignment' as a parent.
Allowing for this would have several advantages, e.g.,
The PsyIR can be cached to persistent storage and read back if required
The PsyIR could be deep-copied to work independently on it.
The text was updated successfully, but these errors were encountered:
schreiberx
changed the title
Serialisation of psyir tree
Serialization of psyir tree
Nov 15, 2024
A deep copy of the tree is possible and in fact is performed by the Fortran backend prior to code generation (because it has to 'flatten' the nested symbol tables). node.copy() does this.
A serialization/deepcopy of a psyir tree is currently not possible.
Using copy.deepcopy on certain files leads, e.g., to this error message:
Allowing for this would have several advantages, e.g.,
The text was updated successfully, but these errors were encountered: