Alibaba Group Holding Limited
FUNCTION-LEVEL REDUNDANCY DETECTION AND OPTIMIZATION
Last updated:
Abstract:
The present disclosure provides computer-executable tools which, implemented in a programming language library, may enable source code written using the library to be compiled to object code instrumented for function-level dynamic analysis of memory allocation functions. By tracking heap reads and writes of each target function, symbols may be mapped to memory addresses allocated therefor, and values of input arguments of functions may be mapped to values of output returns. Based on this information, pure functions which embody redundant computations across multiple executions thereof may be identified, while non-pure functions may be screened out. Among pure functions, candidate functions which are executed having the same arguments and returns across multiple executions thereof may be identified, and these functions may be re-compiled to generate object code wherein redundant subsequent executions are avoided, and return values from a first execution thereof are reused across subsequent executions, reducing computational cost.
Utility
2 Jul 2020
6 Jan 2022