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

Research

SECURE

2017-. The compiler is ideally placed to help the user write secure code. The SECURE project is applying the latest academic research in this area to production GCC and LLVM compilers.

Research

AAP

2015-. An Altruistic Processor (AAP) was created to advance compiler technology for deeply embedded processors with a restricted register set and complex memory structures.

Research

GSO 2.0

2015-. GSO 2.0 is a tool kit under development by Embecosm, allowing multiple approaches to superoptimization to be used.

Research

TSERO

2015-2017. TSERO was a follow on project to the MAGEEC and Superoptimization projects looking at compiling energy efficient code for high performance computing systems and data centers.

Research

Superoptimization

2014. This feasibility study established the feasibility of using superoptimization to improve performance of critical code sections and to create new machine dependent peephole optimization passes for compilers

Research

MAGEEC

2013-2014. The MAGEEC research project aimed to make machine learning feasible in commercial compilers, specifically for generating energy efficient code on deeply embedded systems.