psyclone.domain.common.transformations.raise_psyir_2_alg_trans
Specialise generic PSyIR representing an invoke call within the algorithm layer to a PSyclone algorithm-layer-specific invoke call which uses specialised classes.
Classes
RaisePSyIR2AlgTrans
: Transform a generic PSyIR representation of an Algorithm-layer
- class psyclone.domain.common.transformations.raise_psyir_2_alg_trans.RaisePSyIR2AlgTrans
Transform a generic PSyIR representation of an Algorithm-layer invoke call to a PSyclone version with specialised domain-specific nodes.
Inheritance
- apply(call, index, options=None)
Apply the transformation to the supplied node.
- Parameters:
call (
psyclone.psyir.nodes.Call
) – a PSyIR call node capturing an invoke call in generic PSyIR.index (int) – the position of this invoke call relative to other invokes in the algorithm layer.
options (Optional[Dict[str, Any]]) – a dictionary with options for transformations.
- validate(node, options=None)
Validate the node argument.
- Parameters:
node (
psyclone.psyir.nodes.Call
) – a PSyIR call node capturing an invoke call in generic PSyIR.options (Optional[Dict[str, Any]]) – a dictionary with options for transformations.
- Raises:
TransformationError – if the supplied call argument is not a PSyIR Call node.
TransformationError – if the supplied call argument does not have the expected name which would identify it as an invoke call.
TransformationError – if there is more than one named argument.
TransformationError – if the named argument does not conform to the name=str format.
TransformationError – if the name of the invoke is invalid.
TransformationError – if the invoke arguments are not a PSyIR ArrayReference or CodeBlock.