<div dir="ltr"><div><div><div>Hi all,<br><br></div>Jeremy and I have been working on an abstract for a talk at the upcoming LLVM conference. Here is what we have so far.<br><br>"Title: Machine Guided Compilation and Compiling to Minimize Energy Usage<br>


<br>Compilers currently optimize for execution time and code size. But in a world<br>of diminishing battery life, ever larger data centers and nanoscale energy<br>scavenging devices, what if the compiler could instead optimize for energy<br>


efficiency of the compiled code? Imagine having "-Oe" as an option to LLVM.<br><br>Since June 2013 Embecosm and the University of Bristol, supported by the UK<br>Technology Strategy Board have developed the Machine Guided Energy Efficient<br>


Compliation system. MAGEEC (<a href="http://www.mageec.org" target="_blank">www.mageec.org</a>) uses machine learning to train a<br>compiler on the combinations of compiler optimizations which will minimize the<br>energy consumed by the compiled program. The original target of the project was<br>


to reduce the energy of compiled code by 40% compared to optimized code today.<br><br>Unlike previous projects, MAGEEC is completely generic, capable of working with<br>any compiler and target. It can optimize for any criterion, not just energy<br>


efficiency as we have used, and can be integrated with any machine learning<br>approach. The project is entirely free and open source, with the code and all<br>project design materials freely available online.<br><br>In July 2014, the first complete version of the MAGEEC infrastructure was<br>


released, supporting both GCC and LLVM, and is now undergoing refinement and<br>evaluation.  To support energy efficiency optimization, the project has<br>developed its own low-cost (approx $50) energy measurement board, capable of<br>


sampling voltage and current up to 6 million times per second to an accuracy of<br>better than 1%.  Training also requires a large pool of benchmark programs, and<br>as part of this project we have also developed a new standard free and open<br>


source benchmark suite, BEEBS (<a href="http://www.beebs.eu" target="_blank">www.beebs.eu</a>), suitable for use with low energy<br>deeply embedded systems.<br><br>In this talk we will explain the detailed design of MAGEEC, comparing the<br>


challenges in developing for LLVM and GCC.  This will include the details of<br>the integration with the machine learning system, allowing it to control the<br>pass manager, and which allows us to select the best optimizations on a per<br>


function basis.  We will present the latest performance results, which show<br>that optimizing for energy is a double win, because such programs are almost<br>always much faster, and will include examples where energy usage is halved and<br>


speed doubled compared to -O3.<br><br>We will conclude with a demonstration of MAGEEC in action on ARM processors,<br>using the energy measurement board to measure the energy savings achieved."<br><br></div><br>We're attempting to cover the entire history of the work we've done so far, as we don't have the benefit of having done a couple of talks previously for background information. If anyone has any thoughts before we submit this, that would be great. In particular, James, the graphs you had a few months ago with data from trying different passes with opt, have we quoted have the correct decrease in energy/execution time?<br>


<br></div>Many thanks,<br>Simon<br></div>