forked from sampsyo/llvm-pass-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathturnt.toml
46 lines (36 loc) · 1.46 KB
/
turnt.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[envs.buildpass]
command = "cd ../build && make && cd ../test && `brew --prefix llvm`/bin/clang -O0 -fpass-plugin=`ls ../build/skeleton/SkeletonPass.*` {filename} -o ../exec/{base}.pass"
output.buildpass = "-"
[envs.build]
command = "`brew --prefix llvm`/bin/clang {filename} -o ../exec/{base}.o"
output.build = "-"
[envs.buildzero]
default = false
command = "`brew --prefix llvm`/bin/clang -O0 {filename} -o ../exec/{base}.zero"
output.buildzero = "-"
[envs.emitzero]
command = "`brew --prefix llvm`/bin/clang -O0 -emit-llvm -S {filename} -o {base}.emitzero && cat {base}.emitzero"
output.emitzero = "-"
[envs.emitpass]
command = "cd ../build && make > /dev/null && cd ../test && `brew --prefix llvm`/bin/clang -O0 -emit-llvm -S -fpass-plugin=`ls ../build/skeleton/SkeletonPass.*` {filename} -o {base}.emitpass && cat {base}.emitpass"
output.emitpass = "-"
[envs.exec]
command = "../exec/{base}.o"
output.out = "-"
[envs.execpass]
command = "../exec/{base}.pass"
output.execpass = "-"
[envs.test]
command = """
../exec/{base}.o > tmp_{base}.o.out
../exec/{base}.pass > tmp_{base}.pass.out
diff tmp_{base}.o.out tmp_{base}.pass.out
rm -f tmp_{base}.out
rm -f tmp_{base}.pass.out"""
output.test = "-"
[envs.reduce]
command = """
echo "llvm ir line count built with pass: $(wc -l {base}.emitpass)"
echo "llvm ir line count built with Opt0: $(wc -l {base}.emitzero)"
[ "$(wc -l < "{base}.emitpass" | tr -d ' ')" -lt "$(wc -l < "{base}.emitzero" | tr -d ' ')" ] """
output.reduce = "-"