psyclone.psyir.nodes.read_only_verify_node
This module provides support for verification that read-only variables are indeed not modified (especially accidentally overwritten). The code to be verified may be a single kernel, multiple occurrences of a kernel in an invoke, nodes in an invoke or the entire invoke.
There is currently only one class in this module: ReadOnlyVerifyNode.
Classes
ReadOnlyVerifyNode
: This class can be inserted into a Schedule to mark Nodes for
- class psyclone.psyir.nodes.read_only_verify_node.ReadOnlyVerifyNode(ast=None, children=None, parent=None, options=None)
This class can be inserted into a Schedule to mark Nodes for read-only-verification. By applying the ReadOnlyVerifyTrans transformation, the Nodes marked for extraction become children of (the Schedule of) a ReadOnlyVerifyNode.
Inheritance
- gen_code(parent)
Generates the code required for read-only verification of one or more Nodes. It uses the PSyData API (via the base class PSyDataNode) to create the required callbacks that will allow a library to validate that read-only data is not modified.
- Parameters:
parent (
psyclone.psyir.nodes.Node
.) – the parent of this Node in the PSyIR.
- lower_to_language_level()
Lowers this node (and all children) to language-level PSyIR. The PSyIR tree is modified in-place.
- Returns:
the lowered version of this node.
- Return type:
psyclone.psyir.node.Node
- property read_only_verify_body
- Returns:
the Schedule associated with this ExtractNode.
- Return type: