[llvmlinux] Heavy experiments

Renato Golin renato.golin at linaro.org
Tue Jul 23 22:35:03 UTC 2013

On 23 July 2013 23:21, Marcelo Sousa <marceloabsousa at gmail.com> wrote:

> Compare the IR in what sense? In terms of AST's comparison? At the moment,
> I just want to perform analysis over the IR of several versions of the
> kernel.

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.

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'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.

I've seen this kind of experiments (James did that at ARM once) and it
wasn't easy, but it was just Dhrystone. I fear you'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.

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.

Makes sense?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20130723/c216f234/attachment-0001.html>

More information about the LLVMLinux mailing list