Integrated Optimal Code Generation for Digital Signal Processors
نویسنده
چکیده
In this thesis we address the problem of optimal code generation for irregular architectures such as Digital Signal Processors (DSPs). Code generation consists mainly of three interrelated optimization tasks: instruction selection (with resource allocation), instruction scheduling and register allocation. These tasks have been discovered to be NP-hard for most architectures and most situations. A common approach to code generation consists in solving each task separately, i.e. in a decoupled manner, which is easier from a software engineering point of view. Phase-decoupled compilers produce good code quality for regular architectures, but if applied to DSPs the resulting code is of significantly lower performance due to strong interdependences between the different tasks. We developed a novel method for fully integrated code generation at the basic block level, based on dynamic programming. It handles the most important tasks of code generation in a single optimization step and produces an optimal code sequence. Our dynamic programming algorithm is applicable to small, yet not trivial problem instances with up to 50 instructions per basic block if data locality is not an issue, and up to 20 instructions if we take data locality with optimal scheduling of data transfers on irregular processor architectures into account. For larger problem instances we have developed heuristic relaxations. In order to obtain a retargetable framework we developed a structured architecture specification language, xADML, which is based on XML. We implemented such a framework, called OPTIMIST that is parameterized by an xADML architecture specification. The thesis further provides an Integer Linear Programming formulation of fully integrated optimal code generation for VLIW architectures with a homogeneous register file. Where it terminates successfully, the ILP-based optimizer mostly works faster than the dynamic programming approach; on the other hand, it fails for several larger examples where dynamic programming still provides a solution. Hence, the two approaches complement each other. In particular, we show how the dynamic programming approach can be used to precondition the ILP formulation. As far as we know from the literature, this is for the first time that the main tasks of code generation are solved optimally in a single and fully integrated optimization step that additionally considers data placement in register sets and optimal scheduling of data transfers between different registers sets. This work has been supported by the Ceniit (Center for Industrial Information Technology) 01.06 project of Linköpings universitet, ECSEL (Excellence Center for Computer Science and Systems Engineering), and the RISE (Research Instituet for Integrational Software Engineering) project supported by SSF (Stiftelsen för Strategisk Forskning), the Swedish Foundation for Strategic Research. Department of Computer and Information Science Linköpings universitet SE-581 83 Linköping, Sweden ISBN 91-85523-69-0 ISSN 0345-7524 Linköping Studies in Science and Technology Dissertation No. 1021 Integrated Optimal Code Generation for Digital Signal Processors
منابع مشابه
Exploiting Symmetries for Optimal Integrated Code Generation
High quality code generation for irregular architectures, such as Digital Signal Processors, is a complex task, as it requires a fully integrated approach that simultaneously deals with the most important tasks of instruction selection, register allocation and instruction scheduling. We show how a fully integrated approach for optimal code generation based on dynamic programming can benefit fro...
متن کاملChess: retargetable code generation for embedded DSP processors
This chapter introduces Chess, a retargetable code generation environment for xed-point DSP processors. Chess addresses a range of commercial as well as application-speciic processors, which are increasingly being used for embedded applications in telecommunications, speech and audio processing. Chess is based on a mixed be-havioural/structural processor representation model, which can account ...
متن کاملBenchmarking Code Generation Methodologies for Programmable Digital Signal Processors
We evaluate rapid prototyping tools and compilers as code generation methodologies for programmable digital signal processors (DSPs). Code generated by compilers and rapid prototyping tools have been reported as significantly less efficient in memory usage and execution time versus assembly language code written by expert programmers. As the complexity of the system increases, however, the scal...
متن کاملFinal report for Ceniit project 01.06 (2001–2007) Optimization Algorithms for Integrated Code Generation
In this project we developed integrative methods for generating high-quality code for embedded and instruction-level parallel processor architectures, including regular architectures such as superscalars and VLIW, as well as irregular architectures, such as clustered VLIW and DSP processors. Even though today’s DSP processors are more compiler friendly than a decade ago or than today’s network ...
متن کاملCode generation and optimization for embedded digital signal processors
The advent of deep submicron processing technology has made it possible and desirable to integrate a processor core, a program ROM, and application-specific circuitry all on a single IC. As the complexity of embedded software grows, highlevel languages such as C and C++ are increasingly employed in writing embedded software. Consequently, high-level language compilers have become an essential t...
متن کامل