MAGEEC

The Machine Guided Energy Efficient Compiler (MAGEEEC) project was an InnovateUK supported research program led by Embecosm in partnership with the University of Bristol from May 2013 to November 2014.  Its goal was to make machine learning feasible in commercial compilers, specifically for generating energy efficient code on deeply embedded systems.  The target was to achieve a 20% reduction in typical code energy usage in deeply embedded systems.

MAGEEC built on the previous MILEPOST project, which demonstrated the concept of machine learning optimization in compilers using GCC 4.4.  MILEPOST was a three year collaboration between ARC international plc, IBM Haifa, The University of Edinburgh and INRIA, running from 2006 through 2009 and funded by the European Union.  While MILEPOST demonstrated the potential of the approach it was not easily portable to other compilers, was inflexible in its optimization criteria and used only one machine learning method.  Indeed even migrating the code from GCC 4.4 to GCC 4.5, a task carried out by Embecosm in 2010, proved a significant engineering challenge.

MAGEEC was explicitly designed to be portable to different compilers, to allow different optimization criteria and to allow different machine learning strategies to be used.  Funded under the energy efficiency initiative, we specifically chose to demonstrate the technique by optimizing for energy efficiency of the compiler code.  Embecosm had previously demonstrated that compilers have significant potential to improve the energy efficiency of code.

Under this project we implemented the first version of the MAGEEC framework, and integrated it with the low cost energy measurement board (the MAGEEC Wand) designed by Dr Simon Hollis, then at Bristol University.  This allowed us to sample energy usage on small computers up to 2 million times per second to an accuracy of 1%, essential if we were to get accurate training data.  This first version of MAGEEC used the plugin interface to control the GCC pass manager directly.  We were able to demonstrate machine learning that could reduce energy consumption in deeply embedded computers, using Atmel AVR processors as the evaluation system.  The first public demonstration was given at Cambridge University in 2014 as part of the GNU Tools Cauldron conference.

The research program continued from 2015 in the TSERO project.

Pages in this section

SECURE

The Security Enhancing Compilation for Use in Real Environments (SECURE) project is an InnovateUK supported research program by Embecosm which started in July 2017. Its goal is to take the latest academic ideas for improving security of code, and provide practical reference implications in the main open source compilers, GCC and LLVM. The project has […]

GSO 2.0

The original GNU Superoptimizer (GSO) was pioneering, but has some limitations: it only handles arithmetic instructions, delivers a single result, generates impossible sequences, only supports a carry flag and has a very simple cost model.  Its big advantage is that it is fast. Since GSO was created in 1991, there have been many advances in […]

AAP

An Altruistic Processor (AAP) was created to advance compiler technology for deeply embedded processors with a restricted register set and complex memory structures.  The first version is documented in Embecosm Application Note 13.  It is a 16-bit Harvard architecture with multiple 16-bit word addressed code memories, multiple byte addressed data memories and between 4 and […]

TSERO

2Total Software Energy Reduction and Optimization (TSERO) was an InnovateUK supported follow-on project between Embecosm, Allinea (now part of ARM), Concertim and STFC Daresbury Hartree Center, running from June 2015 to September 2017.  The project aimed to apply the techniques developed in the MAGEEC and Superoptimization projects to compiling energy efficient code for high performance computing […]

Superoptimization

Compilers translate software into code executed by actual processors, but that translation is not always as efficient as desired, even when using traditional optimization techniques are used.  Superoptimization attempts to find the the theoretically best translation of a block of code (in terms of code size, execution speed and energy efficiency).  The first attempts were […]

MAGEEC

The Machine Guided Energy Efficient Compiler (MAGEEEC) project was an InnovateUK supported research program led by Embecosm in partnership with the University of Bristol from May 2013 to November 2014.  Its goal was to make machine learning feasible in commercial compilers, specifically for generating energy efficient code on deeply embedded systems.  The target was to […]