[LLVMdev] Power/Energy Awareness in LLVM

David Chisnall David.Chisnall at cl.cam.ac.uk
Tue Apr 16 01:53:15 PDT 2013


On 15 Apr 2013, at 16:03, Sean Silva <silvas at purdue.edu> wrote:

> See http://llvm.org/bugs/show_bug.cgi?id=6210.

Chris is correct at the coarse granularity, but there are some trades to be made at the fine.  There is some interesting work from MIT in the context of image processing kernels related to the relative costs of saving intermediates out to cache or DRAM vs recomputing them - often recomputing takes one to two orders of magnitude less power.  The tile hashing mechanism in recent MALI GPUs is designed to address the same problem: accesses to memory - especially off-chip memory - use a surprisingly large amount of power.  

Optimising for this requires quite intimate knowledge of the target CPU (sizes of the caches, relative costs of ALU operations to cache / DRAM accesses, and so on), but it would be very interesting if a compiler had this knowledge and could take advantage of it.  

I don't know of any work using LLVM to do this (the MIT work was based on source-to-source transformations via a C++ DSL), but it would certainly be interesting to any company that shipped a large number of mobile devices based on a small number of distinct SoCs.  If only there were such a company that regularly contributed to LLVM...

David





More information about the llvm-dev mailing list