You are here:

Home Research Energy Aware C Compiler




This is the homepage of the encc Energy Aware C Compiler, developed at the Embedded Systems Groups of the Computer Science Department at Dortmund University, Germany. 

encc consists of the following components:

  • the frontend LANCE2
  • a backend for the 16 Bit Thumb Instruction Set of the ARM7TDMI processor
  • a backend for the LEON 32 Bit Processor
  • several adaptions to the original ARM SDT 2.50 Kit
  • an energy profiler (enprofiler), which can be downloaded.

The LANCE frontend, also developed at the University of Dortmund, is being used for research and commercial compilers. It represents the C input source code in a 3 address code intermediate representation (IR), and offers C++ library functions to access the contents of its internal data structures.
One part of LANCE2 is a library common of high level optimization tools operating on the IR, including e.g. jump optimization, common subexpression elimination, dead code elimination.

The backend of the encc compiler uses a tree pattern matching algorithm to perform code selection. Register allocation employs a graph based heuristic method. After this phase, several backend optimizations are performed, including among others instruction scheduling, register pipelining and mapping of program objects to different types of memory. Further low level backend optimizations like loop transformation, redundant load/store elimination and other optimizations are under development.
A database containing information about the energy consumption of each individual instruction (obtained by physical measurement of the ARM7TDMI processor) is also incorporated into encc, so that all optimizations can be evaluated with respect to overall energy consumption. This analysis is done by means of a profiler that considers the executed instructions as well as the information about memory accesses given by the instruction set simulator. The contribution of each access and of each instruction is added up, taking inter-instruction effects into account. For further information, refer to the workflow figures below.
The fact that memory accesses are also considered leads to a necessity to specify the memory system with its data bus width, wait states as well as energy consumption. This info is taken into account during encc's code generation and for the evaluation with the energy profiler.

encc has also been retargeted to generate code for the LEON processor, a SPARC V8-implementation which is available in the form of VHDL source code, distributed under the rules of the LGPL. Using this processor model, it is possible to synthesize the LEON to gate level, and determine the switching activity by simulation. The switching activity is a measure for the energy dissipated by the processor.
The advantage of the freely available VHDL model is the fact that the hardware may be changed. Afer re-synthesis, new energy values are obtained which may be compared to the energy consumption of the initial hardware. In this way, optimizations both on the hardware and on the software side (within the encc compiler) can be evaluated.

encc is currently available for Solaris 2.8 and SuSe Linux 6.4.