psyclone.psyir.nodes.file_container#

This module contains the FileContainer node implementation.

Classes#

  • FileContainer: PSyIR node to encapsulate the scope of a source file. In the

class psyclone.psyir.nodes.file_container.FileContainer(name, **kwargs)[source]#

PSyIR node to encapsulate the scope of a source file. In the PSyIR, a FileContainer is identical to a Container. However, it is useful to distinguish this type of container for the backends, which can have different constraints/syntax for general Containers and a FileContainer. For example, a FileContainer can not have any symbol table entries in Fortran.

Inheritance

Inheritance diagram of FileContainer
property invokes#

Return the Invokes object associated to this FileContainer. This is for compatibility with old psyclone transformation scripts. Previously, the entry point was PSy, and the script had to find the list of InvokeSchedules, now the entry point is the root FileContainer:

before: PSy -> Invokes -> Invoke -> InvokeSchedule now: FileContainer –^

This method creates a shortcut:
PSy -> Invokes -> Invoke -> InvokeSchedule

^— FileContainer –^

So that previous:
def trans(psy):

psy.invokes.get_invoke(‘name’).schedule

still work as expected. However, it exposes the PSy hierachy to users scripts, so this will eventually be deprecated.

Returns:

the associated Invokes object.

Return type:

psyclone.psyGen.Invokes

Raises:

NoInvokesError – if no InvokeSchedule was found.