<div dir="ltr">On 23 July 2013 23:21, Marcelo Sousa <span dir="ltr">&lt;<a href="mailto:marceloabsousa@gmail.com" target="_blank">marceloabsousa@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Compare the IR in what sense? In terms of AST&#39;s comparison? At the moment, I just want to perform analysis over the IR of several versions of the kernel. </div>
</div></div></div></blockquote><div></div></div><br></div><div class="gmail_extra">What kind of analysis? The AST is gone on the IR level, but you could compare the number and strength of instructions, divided by their stride, if vector instructions, etc. Another way would be to compile the changed IRs into executable and run micro-benchmarks, but the kernel is not good for that.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">IR gets bloated quite quickly and (as you may have seen on a number of threads on the list), once you split the compilation between Clang and LLC, you lose a lot of information (that you shouldn&#39;t). It means that what you can actually do on the IR level (genetic algorithms to find the best set of passes, for instance) is greatly reduced by the fact that, each time, your chances of compiling to a final executable that actually makes sense, and can be compared to a vanilla Clang binary (with the same flags) tend towards zero.<br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">I&#39;ve seen this kind of experiments (James did that at ARM once) and it wasn&#39;t easy, but it was just Dhrystone. I fear you&#39;ll spend more time trying to make the thing work in the first place and will give up mid-way to try something different, but I could be wrong.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Maybe what you could do is to find one specific kernel module (say a network or video driver) and do your experiments on it, with a standard LLVM-compiled kernel. Or even an independent sub-directory of the kernel (HID, or scheduling), but not the whole kernel.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Makes sense?</div><div class="gmail_extra"><br></div><div class="gmail_extra">cheers,</div><div class="gmail_extra">--renato</div></div>