Power/Energy Awareness in GCC

Andrey Belevantsev abel@ispras.ru
Tue Apr 16 06:44:00 GMT 2013


On 15.04.2013 20:21, Tobias Burnus wrote:
> Ghassan Shobaki wrote:
>> We are currently working on a research
>> project on instruction scheduling for low power (experimenting with
>> different algorithms for minimizing switching power) and would like to
>> find out if GCC already has such a scheduler and how it can be enabled,
>> so that we can experiment with it.
>
> Your project sounds similar to the following project:
> http://gcc.gnu.org/ml/gcc/2013-03/msg00259.html ("Identifying Compiler
> Options to Minimise Energy Consumption for Embedded Platforms").

We also did similar research in the past, mainly investigating how compiler 
feedback (via instrumentation and profiling) can assist dynamic voltage 
scaling in the OS (we had fully offline DVS as well as the patches to the 
Linux scheduler), but we also did some experiments with controlling 
bit-switching in the scheduler and some other work.

You can find the relevant papers with some preliminary DVS work and 
bit-switching experiments at 
http://www.doc.ic.ac.uk/~phjk/GROW09/papers/06-PowerBelevantsev.pdf and 
with more DVS research and experiments from GROW 2010 at 
http://gcc.gnu.org/wiki/GROW-2010?action=AttachFile&do=get&target=2010-GROW-Proceedings.pdf.

To be honest, I can only repeat the same things I said to James on the 2012 
Cauldron -- I don't think you can achieve much of power savings from within 
the compiler, at least until the hardware design will change.  The 
scheduling freedom in minimizing bit-switching is very limited and this is 
not going to buy much.  Any information that a compiler can produce for you 
will be about program behavior related to CPU and memory, and no matter how 
well you use it, again you will not save much power as nowadays CPU will 
not be the largest power consumer in an embedded system (if you save e.g. 
10% CPU power consumption which is 10% of total system consumption, that's 
only 1%).  One can achieve more by turning off a display or a networking 
device.

But I will be happy to be proven wrong :-) So good luck with the research.

Andrey



More information about the Gcc mailing list