This repository has been archived by the owner on May 25, 2018. It is now read-only.
forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Chih-Yung Liang edited this page Jun 17, 2017
·
6 revisions
Welcome to the compiler-project wiki!
- Clone the repository
- Compile the repository
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_TARGETS_TO_BUILD=X86 ..
$ taskset -c 0-11 make -j24 llc
- Modify the Makefile is the test1 suit
- make the test suit, some information will be dumped here.
$ # optimized
$ make 'LLC=<Build-Dir>/bin/llc -x86-call-spill-eli -stats -debug -debug-only=x86-eliminate-call-spill' clean all
$ # baseline
$ make 'LLC=<Build-Dir>/bin/llc' clean all
LLC = llc
all: test1
test1: main.c test1.c safe_run.s
clang test1.c -o test1.ll -S -emit-llvm
opt -O3 test1.ll -o test1.1.ll -S
$(LLC) -O3 test1.1.ll -o test1.s
gcc main.c safe_run.s test1.s -o test1
run: test1
$(PIN_ROOT)/pin -t ./InstCount.so -- ./test1
clean:
rm -rf test1.ll test1.1.ll test1.s test1
Debug info & statistic
Pin tool