<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 15, 2013 at 12:28 PM, Ghassan Shobaki <span dir="ltr"><<a href="mailto:ghassan_shobaki@yahoo.com" target="_blank">ghassan_shobaki@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif"><br>Thank you for the link! It is not clear though what -Oe actually implements. Does it simply optimize for speed as suggested by Chris or it does other things?<br>
</div></div></blockquote><div><br></div><div style>There is no -Oe</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif">
Generally speaking, speed correlates well with low energy, because completing the task in fewer cycles means consuming less energy unless the speed optimization causes the energy per cycle to be significantly higher. In theory, some compiler and hardware optimizations such as instruction-level parallelism (ILP), speculative execution and pre-fetching increase the energy consumption per cycle. If the same speed can be achieved using less energy per cycle by controlling such optimizations, the total energy consumption will be less. Some of these optimizations may be controlled by the compiler. Also, the switching energy from one instruction to another depends on the instruction
 order. So, in theory, if there are multiple instruction orders that give the same speed, the order that minimizes the switching energy will consume less overall energy. There is some academic research on this with simulation data, but I am not aware of any actual implementation in a production compiler that proves actual energy reduction. Has anyone ever implemented and experimented with such optimizations in LLVM?<br>
<br></div></div></blockquote><div><br></div><div style>I'm not aware of any such work.</div><div style><br></div><div style>-- Sean Silva </div></div><br></div></div>