Changeset 4314


Ignore:
Timestamp:
Nov 27, 2014, 5:33:06 PM (4 years ago)
Author:
linmengl
Message:

Add setup instruction for building and testing Parabix-LLVM

File:
1 moved

Legend:

Unmodified
Added
Removed
  • parabix-LLVM/llvm_git/README.md

    r4302 r4314  
    1 Complete Integer Project
     1Parabix LLVM
    22===============================
    33This project aims to provide a better support for LLVM IR vector operations. Usually,
     
    1717The full description of this project can be found [here](http://parabix.costar.sfu.ca/wiki/CompleteInteger).
    1818
     19Build And Test The Modified LLVM
     20================================
     211. Clone this project:
     22
     23    svn co http://parabix.costar.sfu.ca/svn/parabix-LLVM
     24
     252. Prepare to build the modified LLVM, using cmake.
     26
     27    cd parabix-LLVM
     28    mkdir llvm-build
     29    cd llvm-build
     30    cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_BUILD_TYPE=Debug ../llvm_git/
     31
     323. Make
     33
     34    make -j8
     35
     364. (Optional) Check the whole LLVM with its test suit
     37
     38    make check
     39
     405. Make the built executable available to use.
     41
     42    sudo ln -s YOUR-ABSOLUTE-PATH/parabix-LLVM/llvm_build/bin/llc /usr/bin/llc-svn
     43    sudo ln -s YOUR-ABSOLUTE-PATH/parabix-LLVM/llvm_build/bin/opt /usr/bin/opt-svn
     44    sudo ln -s YOUR-ABSOLUTE-PATH/parabix-LLVM/llvm_build/bin/lit /usr/bin/lit-svn
     45    sudo ln -s YOUR-ABSOLUTE-PATH/parabix-LLVM/llvm_build/bin/llvm-link /usr/bin/llvm-link
     46
     47   (Optional) Check the static tests for Parabix:
     48   (Static tests check the compiled assembly to see if the correct machine code is generated.)
     49
     50    cd parabix-LLVM/test/Parabix
     51    lit-svn .
     52
     536. Install clang (if you don't have clang 3.4 or later)
     54
     55    sudo apt-get install clang-3.4
     56
     577. Install the Jinja2 python template. Jinja2 is used for testing.
     58
     59    easy_install Jinja2
     60
     618. Clone lib_ir. cd to some folder you prefer and then type:
     62
     63    svn co http://parabix.costar.sfu.ca/svn/trunk/
     64
     659. For quick setup, type the following commands. Refer to the README.md file in lib_ir root folder for more detail and instructions on compiling with AVX2.
     66
     67    cd trunk/lib_ir/build
     68    cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_COMPILER=/usr/bin/clang++-3.4 -DCMAKE_C_COMPILER=/usr/bin/clang-3.4 ..
     69
     7010. (Optional) Enable auto-test for u8u16. If you skip this step, u8u16 cannot be tested. Back the svn root, and type
     71
     72    svn co http://parabix.costar.sfu.ca/svn/proto/
     73    cd proto/u8u16
     74    svn co http://u8u16.costar.sfu.ca/svn/QA
     75    cd QA
     76    python u8u16_testgen.py
     77
     7811. Check the IR library for Parabix and the modified LLVM:
     79
     80    cd trunk/lib_ir/build
     81    make check
    1982
    2083Low Level Virtual Machine (LLVM)
Note: See TracChangeset for help on using the changeset viewer.