Open Access
Code Size Optimization for Embedded Processors
Neil Edward Johnson
- 01 Jan 2004
TL;DR: This thesis develops the Value State Dependence Graph as a powerful intermediate form and shows how procedural abstraction can be advantageously applied to the VSDG, and presents a method for using these instructions to reduce code size by provisionally combining loads and stores before code generation.
read more
Abstract: This thesis studies the problem of reducing code size produced by an optimizing compiler. We develop the Value State Dependence Graph (VSDG) as a powerful intermediate form. Nodes represent computation, and edges represent value (data) and state (control) dependencies between nodes. The edges specify a partial ordering of the nodes—sufficient ordering to maintain the I/O semantics of the source program, while allowing optimizers greater freedom to move nodes within the program to achieve better (smaller) code. Optimizations, both classical and new, transform the graph through graph rewriting rules prior to code generation. Additional (semantically inessential) state edges are added to transform the VSDG into a Control Flow Graph, from which target code is generated. We show how procedural abstraction can be advantageously applied to the VSDG. Graph patterns are extracted from a program’s VSDG. We then select repeated patterns giving the greatest size reduction, generate new functions from these patterns, and replace all occurrences of the patterns in the original VSDG with calls to these abstracted functions. Several embedded processors have loadand store-multiple instructions, representing several loads (or stores) as one instruction. We present a method, benefiting from the VSDG form, for using these instructions to reduce code size by provisionally combining loads and stores before code generation. The final contribution of this thesis is a combined register allocation and code motion (RACM) algorithm. We show that our RACM algorithm formulates these two previously antagonistic phases as one combined pass over the VSDG, transforming the graph (moving or cloning nodes, or spilling edges) to fit within the physical resources of the target processor. We have implemented our ideas within a prototype C compiler and suite of VSDG optimizers, generating code for the Thumb 32-bit processor. Our results show improvements for each optimization and that we can achieve code sizes comparable to, and in some cases better than, that produced by commercial compilers with significant investments in optimization technology.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Patent
Implementing instruction set architectures with non-contiguous register file specifiers
Michael K. Gschwind,Robert K. Montoye,Brett Olsson,John-David Wellman +3 more
- 04 Aug 2009
TL;DR: In this paper, a non-contiguous register file specifier is used to implement instruction set architectures with non-convex register file file specifiers, and a method for processing instruction code includes processing a fixedwidth instruction of a fixed-width instruction set using a noncontiguous registers specifier.
80
Static Program Analysis based on Virtual Register Renaming
Jeremy Singer
- 01 Jan 2006
TL;DR: This dissertation develops the principles, properties, and practice of SSI construction and data flow analysis and identifies the family of VRRSs, which are all CFGs with different virtual register naming conventions.
Intermediate representations in imperative compilers: A survey
James Stanier,Des Watson +1 more
TL;DR: It is concluded that mainstream compilers, especially in the multicore era, could benefit from further IR innovations, and the divide between academic research and real-world compiler technology is commented on.
Optimizing compilation with the Value State Dependence Graph
Alan C. Lawrence
- 01 Jan 2007
TL;DR: It is demonstrated how effective control flow can be reconstructed from just the dataflow information comprising the VSDG, and it is concluded that it is now practical to discard the control flow information rather than maintain it in parallel as is done in many previous approaches.
Patent
Code motion based on live ranges in an optimizing compiler
Shimin Cui,Raul E. Silvera +1 more
- 23 Dec 2008
TL;DR: In this paper, live ranges for variables in a flow graph are determined as candidates in which code will be moved from a use site within the source code to a definition site within source code.
15
References
•Book
Computers and Intractability: A Guide to the Theory of NP-Completeness
Michael Randolph Garey,David S. Johnson +1 more
- 01 Jan 1979
TL;DR: The second edition of a quarterly column as discussed by the authors provides a continuing update to the list of problems (NP-complete and harder) presented by M. R. Garey and myself in our book "Computers and Intractability: A Guide to the Theory of NP-Completeness,” W. H. Freeman & Co., San Francisco, 1979.
Cramming More Components Onto Integrated Circuits
Gordon E. Moore
- 01 Jan 1998
TL;DR: Integrated circuits will lead to such wonders as home computers or at least terminals connected to a central computer, automatic controls for automobiles, and personal portable communications equipment as mentioned in this paper. But the biggest potential lies in the production of large systems.
•Book
The Design and Analysis of Computer Algorithms
Alfred V. Aho,John E. Hopcroft +1 more
- 01 Jan 1974
TL;DR: This text introduces the basic data structures and programming techniques often used in efficient algorithms, and covers use of lists, push-down stacks, queues, trees, and graphs.
10.6K
Related Papers (5)
Steven S. Muchnick
- 01 Jan 1997
Chris Lattner,Vikram Adve +1 more
- 20 Mar 2004
Paul Havlak
- 12 Aug 1993