Code transformation to optimize fragments that implement constant loading
Abstract
A code, which may be a post-link binary or a pre-link object file, can be transformed to optimize code fragments that implement loading a constant from memory. A constant loading code fragment includes address computing operations that compute (or copy) an address representation of a constant for consumption by a memory access operation, and the memory access operation that loads the constant. Information from control flow analysis, data flow analysis, and binary structure/configuration analysis are examined to identify code fragments of a code that implement constant loading. A tool transforms the code to convert the identified code fragments. To optimize, the tool may convert operations, eliminate operations, convert indirect calls to direct calls, inline functions called indirectly, eliminate unused constant data, modify relocations, etc. This optimization can also be applied recursively. The same tool or another tool can subsequently analyze the transformed code one more times to identify additional opportunities for optimizations revealed by the transformation or to apply the transformation for a different profile of the application.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 22 · Forward citations: 16.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method for transforming code comprising: identifying, utilizing at least one processing unit, at least one portion of a code that implements constant loading by analyzing information from control flow analysis, data flow analysis, and binary representation and configuration analysis of the code, the code comprising a binary file stored in a machine-readable media, wherein said identifying further comprises analyzing the information from the binary representation and configuration analysis of the code to identify that the at least one portion of the code accesses read-only areas of an address
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 16 total)
References Cited — Backward Prior Art (22)
Non-Patent Literature (5)
- "Link-Time Binary Rewriting Techniques for Program Compaction", Bjorn De Sutter, Bruno De Buss, and Koen De Bosschere. Ghent University. ACM Transaction on Programming Languages and Systems, vol. 27, No. 5, Sep. 2005, p. 882-945.
- "Software Power Optimization via Post-Link-Time Binary Rewriting", Saumya Debray, Rober Muth, and Scott Watterson. Department of Computer Science, Univeristy of Arizona, Tuscson, AZ. 2001.
- "Towards Better Inlining Decisions Using Inling Trails", Jeffrey Dean and Craig Chambers, Department of Computer Science and Engineering, University of Washington. 1994.
- Harris, Laune C. & Miller, Barton P., "Practical Analysis of Stripped Binary Code," ACM SIGARCH Computer Architecture News, vol. 33, No. 5, pp. 63-68, Dec. 2005.
- Li, S., "A Survey on Tools for Binary Code Analysis," Stony Brook University, 39 pages, Aug. 24, 2004.