Automatically Transform Pass-by-Value Semantics into Pass-by-Reference Implementation
System and method for compiling a program, including determining one or more program structures containing one or more variables at the entry and exit of each program structure, wherein each variable specifies a value transfer operation between outside the program structure and inside the program st...
Saved in:
Main Authors | , , , |
---|---|
Format | Patent |
Language | English |
Published |
08.11.2018
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | System and method for compiling a program, including determining one or more program structures containing one or more variables at the entry and exit of each program structure, wherein each variable specifies a value transfer operation between outside the program structure and inside the program structure. Each value transfer operation may specify a value transfer between a respective one or more source variables and a destination variable. A subset of the destination variables may be determined for which assigning the destination variable to a memory resource of a corresponding source variable does not disrupt the functionality of the program. For each of the one or more value transfer operations, the value transfer operation may be implemented, where the implementation of the value transfer operation may be executable to assign each of the determined subset of destination variables to a respective memory resource, thereby mapping the variables to the memory resources, and dynamically change the mapping, including assigning the destination variable to the memory resource of a first source variable of the one or more source variables, thereby transferring the value from the first source variable to the destination variable without copying the value between the memory resources. The method may be implemented for programs operating according to either a static or dynamic schedule. |
---|---|
Bibliography: | Application Number: US201715588298 |