arcana-lab / noelle

NOELLE Offers Empowering LLVM Extensions
MIT License
75 stars 36 forks source link

A new way to compile NOELLE (with several additional configs) #21

Closed vgene closed 3 years ago

vgene commented 3 years ago

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 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

Speed

The new compilation pipeline is significant faster on Princeton servers. Thanks to all components in core and tools being compiled in parallel.