Saturday, September 30, 2006

SPECtations

Today I installed SPEC2000 on the PowerPC. It was quite painful, but
finally it worked. I had to log in as administrator, and then I had
to add these two lines to install.sh:

VERBOSE=1
SPECTARGET=/local/admin/spec2000

Also, I gave the user permission to write everything on the top of the
spec installation directory. The rest is only to follow on
documentation. When it asks to run spec, try this
runspec --action=build --tune=base gzip, e.g, don't give
a --confing option. Anyways, I could not make LLVM to find
the spec :( But I can compile the sources. I just compile gzip, and it
worked fine. Compile all the sources, and give one of the input files to
the executable, for instance, combine.inpute.

Also, I've updated my LLVM version. Well, to install a new register
allocator is different. I knew this before, but I decided to summarize
the steps to help me in the future. It goes like this:

In your register allocator .cpp file add the following include;

#include "llvm/CodeGen/RegAllocRegistry.h"

In your register allocator .cpp file define a create function in the
form;

FunctionPass *createMyRegisterAllocator() {
return new MyRegisterAllocator();
}

and the "installing" static constructor declaration, in the form;

static RegisterRegAlloc myRegAlloc("myregalloc",
" my register allocator help string",
createMyRegisterAllocator);

To force the load/linking of your register allocator into the llc/lli
tools, add your create function's global declaration to "Passes.h".

Add a "pseudo" call line to
"llvm/Codegen/LinkAllCodegenComponents.h".

Apropos, when testing the llc tool, it is better to disable the jit compiler, so the test runs faster:

make TEST=nightly report.html DISABLE_JIT=1

Friday, September 08, 2006

SPEC 2000

I finally got SPEC 2000, and I run the tests on it. For some reason, in my first attempt the compiler produced more than 12Giga of data. Well, this made my co-workers to burst into laugh, and made me to burst into tears. I've updated my llvm, just in case, and after the updating, I got 'only' 1.3 G of data, what is better, even though it is still quite a lot of output. I wonder how the old people should test SPEC on the old times. Anyways, I've got a table here.

Wednesday, September 06, 2006

More experiments

I could get some more time improvement in my register allocation algorithm. I will be now trying to implement a conversion of three address code instructions to two address code for the X86 port. It worked quite well with PowerPC. The problem is that X86 has much more two address instructions. Annoying architecture... By the way, the new table contains some improvements.

Friday, September 01, 2006

First data checked in!

Hey, I've got some documentation checked on the official LLVM web page!
Thank you for the honor, Chris :)
Hum... I think some more people had the same question as I did, when
testing the register allocation. Here goes the explanation:
In TEST.llc.Makefile, you can set the type of register allocator that
you want:

LLC_OPTS = -f -o=/dev/null -stats -time-passes -regalloc=linearscan

to compare against your allocator, open "Makefile.program", and set

LLCBETAOPTION := -regalloc=your_allocator -fast

After that, you just have to type make
TEST=nightly report.html on project/llvm-test/
An '*' on the report means that your test failed. The report will give you
your compile time, and the running time of the compiled file.