This is a fork of the LLVM repository that implements Revec, an IR-level pass that retargets vectorized code between processor generations. In general, revectorization is our proposed task of recompiling non-portable vectorized code to leverage higher bitwidth instruction sets on newer architectures.
For details of the pass, please see Revec: Program Rejuvenation through Revectorization.
Citation: (* denotes equal contribution)
Charith Mendis *, Ajay Jain *, Paras Jain, and Saman Amarasinghe. 2019. Revec: Program Rejuvenation through Revectorization. In Proceedings of the 28th International Conference on Compiler Construction (CC ’19), February 16–17, 2019, Washington, DC, USA. ACM, New York, NY, USA, 13 pages.
Install Clang-6.0, CMake, and Ninja to build our modified version of LLVM/Clang:
sudo apt-get update
sudo apt-get install llvm-6.0 clang-6.0 cmake ninja-build
Clone LLVM and Clang with the Revectorizer pass:
cd $ROOTDIR
git clone [email protected]:revec/llvm-revec.git llvm
cd $ROOTDIR/llvm/tools
git clone [email protected]:revec/clang-revec.git clang
cd $ROOTDIR/llvm/tools/clang
git clone [email protected]:llvm-mirror/clang-tools-extra.git extra
cd $ROOTDIR/llvm/projects
git clone [email protected]:llvm-mirror/libcxx.git
git clone [email protected]:llvm-mirror/libcxxabi.git
git clone [email protected]:llvm-mirror/compiler-rt.git
Build Clang:
mkdir $ROOTDIR/build
cd $ROOTDIR/build
CXX=clang++-6.0 CC=clang-6.0 cmake -G Ninja ../llvm -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_USE_LINKER=gold -DLLVM_TARGETS_TO_BUILD="X86"
ninja clang