CPF builds everything into a debug build (with debug LLVM) and a release build (with release LLVM). Controlling the debug and release of SCAF and SVF, which are under the hood of NOELLE right now, is a little bit tricky. A full release mode compiler is necessary for running huge benchmarks (like the ones in SPEC 2017), while a full debug mode compiler is apparently the best one for debugging:)
On top of that, NOELLE currently builds each part in core and tools sequentially, and the Cmake part will take a lot of time. To address this problem, a new src-fast target is added to the main Makfile, which will use cmake to build core and tools as two whole projects.
The only change to original compilation
The addition will change one behavior of make all.
I changed external/patch/build.sh:39 (now line 52), to not remove the build before building SVF. So if SVF exists, it may not rebuild it self. The problematic case I can think of is to build SVF with debug LLVM and release LLVM in the same build directory. This case will not happen in the new compilation pipeline because compiling with debug LLVM will happen in Debug-build, and also turning on Debug mode for SVF, so that potential bugs in SVF can be debugged by GDB.
Additional Features
Configure Debug or Release mode of SVF, SCAF, and, NOELLE by env var ($DEBUG=="TRUE" or "FALSE" (anything else in fact))
Configure number of compilation workers of all components by env var $JOBS
make all JOBS=X
Configure the Clang being used by env var $CLANG_BIN. This is necessary because we always want release version of Clang to compile things, while we might link to a debug version of LLVM (by setting LLVM_DIR rather than changing the compiler we use)
Speed
The new compilation pipeline is significant faster on Princeton servers. Thanks to all components in core and tools being compiled in parallel.
Why
CPF builds everything into a debug build (with debug LLVM) and a release build (with release LLVM). Controlling the debug and release of SCAF and SVF, which are under the hood of NOELLE right now, is a little bit tricky. A full release mode compiler is necessary for running huge benchmarks (like the ones in SPEC 2017), while a full debug mode compiler is apparently the best one for debugging:)
On top of that, NOELLE currently builds each part in
core
andtools
sequentially, and the Cmake part will take a lot of time. To address this problem, a newsrc-fast
target is added to the main Makfile, which will use cmake to buildcore
andtools
as two whole projects.The only change to original compilation
The addition will change one behavior of
make all
. I changedexternal/patch/build.sh:39
(now line 52), to not remove the build before building SVF. So if SVF exists, it may not rebuild it self. The problematic case I can think of is to build SVF with debug LLVM and release LLVM in the same build directory. This case will not happen in the new compilation pipeline because compiling with debug LLVM will happen inDebug-build
, and also turning on Debug mode for SVF, so that potential bugs in SVF can be debugged by GDB.Additional Features
$DEBUG
=="TRUE" or "FALSE" (anything else in fact))$JOBS
make all JOBS=X
$CLANG_BIN
. This is necessary because we always want release version of Clang to compile things, while we might link to a debug version of LLVM (by settingLLVM_DIR
rather than changing the compiler we use)Speed
The new compilation pipeline is significant faster on Princeton servers. Thanks to all components in core and tools being compiled in parallel.