Installation
- Download LLVM 2.9 source
- Extract the source
- Navigate to the lib/Target directory
- svn co svn://lenny.eng.utah.edu/research/ece/caddis/hwrt/svn/HWRT/LLVM_Trax/Trax
- Edit lib/Support/Triple.cpp and include/llvm/ADT/Triple.h adding
Trax to the architecture lists similar to the mblaze entries.
- Edit "configure" script in the main directory by adding the Trax
target to all the target lists (again, use mblaze search to find
these lines.
- Add IntrinsicsTrax.td to the list of things included from the
include/llvm/Intrinsics.td file.
- From the llvm-2.9 directory, run the following commands:
mv lib/Target/Trax/IntrinsicsTrax.td include/llvm/IntrinsicsTrax.td
./configure
make
./Release/bin/llc --version
Trax should show up on the list.
ln -s lib/Target/Trax/IntrinsicsTrax.td include/llvm/IntrinsicsTrax.td
should also work, but it was causing the make to hang for me so I
changed it to mv.
After that works, you can run llc -march=trax to generate trax
assembly from llvm .bc or .ll files.
For linking, download the linker from
svn://lenny.eng.utah.edu/research/ece/caddis/hwrt/svn/HWRT/LLVM_Trax/linker
A list of libraries that are useful will be available eventually.