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

0 Comments:

Post a Comment

<< Home