aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-06-28 10:09:21 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-06-28 10:09:21 +0200
commite8b8cf1bd7c77f8199d3586a7576e92adda26c39 (patch)
tree5f8c4fcf4e386759fe3df997a65afa1ac5acd00e /test
parent143db5638d6941009eda3e5c70c84a1c45f7bff6 (diff)
parentc97bad7c55cef10fb1336c6851ff01125fc56a09 (diff)
downloadcompcert-kvx-e8b8cf1bd7c77f8199d3586a7576e92adda26c39.tar.gz
compcert-kvx-e8b8cf1bd7c77f8199d3586a7576e92adda26c39.zip
Merge branch 'mppa-work' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into mppa-work
Diffstat (limited to 'test')
-rw-r--r--test/monniaux/Makefile12
-rwxr-xr-xtest/monniaux/gencompile.py2
-rwxr-xr-xtest/monniaux/gengraphs.py19
-rw-r--r--test/monniaux/rules.mk2
4 files changed, 20 insertions, 15 deletions
diff --git a/test/monniaux/Makefile b/test/monniaux/Makefile
index b436c034..e099ed51 100644
--- a/test/monniaux/Makefile
+++ b/test/monniaux/Makefile
@@ -5,14 +5,14 @@ CCOMP?=ccomp
all: compile_times.pdf measure_times.k1c.pdf
verifier_times.txt: Asmblockdeps.patch
- patch ../../extraction/Asmblockdeps.ml < $<
- (cd ../../ && make -j20 && make install); patch -R ../../extraction/Asmblockdeps.ml < $<
+ patch $(realpath ../../extraction/Asmblockdeps.ml) < $<
+ (cd ../../ && make -j20 && make install); patch -R $(realpath ../../extraction/Asmblockdeps.ml) < $<
bash clean_benches.sh
bash build_benches.sh $@
oracle_times.txt: PostpassSchedulingOracle.patch
- patch ../../mppa_k1c/PostpassSchedulingOracle.ml < $<
- (cd ../../ && make -j20 && make install); patch -R ../../mppa_k1c/PostpassSchedulingOracle.ml < $<
+ patch $(realpath ../../mppa_k1c/PostpassSchedulingOracle.ml) < $<
+ (cd ../../ && make -j20 && make install); patch -R $(realpath ../../mppa_k1c/PostpassSchedulingOracle.ml) < $<
bash clean_benches.sh
bash build_benches.sh $@
@@ -22,10 +22,10 @@ measures.csv:
bash run_benches.sh $@
compile_times.pdf: gencompile.py verifier_times.txt oracle_times.txt
- python3.6 $^ $@
+ python3.5 $^ $@
measure_times.k1c.pdf: gengraphs.py measures.csv
- python3.6 $^ $(basename $(basename $@))
+ python3.5 $^ $(basename $(basename $@))
.PHONY:
clean:
diff --git a/test/monniaux/gencompile.py b/test/monniaux/gencompile.py
index 6167c522..739e535a 100755
--- a/test/monniaux/gencompile.py
+++ b/test/monniaux/gencompile.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3.6
+#!/usr/bin/python3.5
import numpy as np # type: ignore
import matplotlib.pyplot as plt # type: ignore
diff --git a/test/monniaux/gengraphs.py b/test/monniaux/gengraphs.py
index 97cb08dc..afcb6cfd 100755
--- a/test/monniaux/gengraphs.py
+++ b/test/monniaux/gengraphs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3.6
+#!/usr/bin/python3.5
import numpy as np # type: ignore
import matplotlib.pyplot as plt # type: ignore
@@ -33,7 +33,7 @@ def extract_compiler(env: str) -> str:
return " ".join(words)
def extract_compilers(envs: List[str]) -> List[str]:
- compilers: List[str] = []
+ compilers = []
for env in envs:
compiler = extract_compiler(env)
if compiler not in compilers:
@@ -48,15 +48,19 @@ def subdivide_interv(inf: Any, sup: float, n: int) -> List[float]:
# envs is the list of environments to compare
# The returned value will be a dictionnary associating the compiler (e.g. "gcc") to his relative comparison on the best result
def make_relative_heights(data: Dict[str, List[float]], envs: List[str]) -> Dict[str, List[float]]:
- n_benches: int = len(data["benches"])
- cols: Dict[str, List[float]] = {extract_compiler(env):data[env] for env in envs}
+ #n_benches: int = len(data["benches"])
+ #cols: Dict[str, List[float]] = {extract_compiler(env):data[env] for env in envs}
+ n_benches = len(data["benches"])
+ cols = {extract_compiler(env):data[env] for env in envs}
- ret: Dict[str, List[float]] = {}
+ #ret: Dict[str, List[float]] = {}
+ ret = {}
for compiler in cols:
ret[compiler] = []
for i in range(n_benches):
- maximum: float = max([cols[compiler][i] for compiler in cols])
+ #maximum: float = max([cols[compiler][i] for compiler in cols])
+ maximum = max([cols[compiler][i] for compiler in cols])
for compiler in cols:
ret[compiler].append(cols[compiler][i] / float(maximum))
@@ -71,7 +75,8 @@ def generate_file(f: str, cols: List[str]) -> None:
compilers = extract_compilers(cols)
start_inds = subdivide_interv(ind, ind+2*width, len(compilers))
inverse_cycles = {key:[1./x if isinstance(x, int) else x for x in list(df[key])] for key in df.columns}
- heights: Dict[str, List[float]] = make_relative_heights(inverse_cycles, cols)
+ #heights: Dict[str, List[float]] = make_relative_heights(inverse_cycles, cols)
+ heights = make_relative_heights(inverse_cycles, cols)
fig, ax = plt.subplots()
rects = []
diff --git a/test/monniaux/rules.mk b/test/monniaux/rules.mk
index 33a71a46..211feafd 100644
--- a/test/monniaux/rules.mk
+++ b/test/monniaux/rules.mk
@@ -9,7 +9,7 @@ K1C_CFLAGS = -D__K1C_COS__ -std=c99 -O3 -Wall -Wextra -Werror=implicit $(ALL_CF
K1C_CFLAGS_O1 =-std=c99 -O1 -fschedule-insns2 -Wall -Wextra -Werror=implicit $(ALL_CFLAGS)
K1C_CCOMP = ../../../ccomp
-K1C_CCOMPFLAGS=-O3 -Wall $(ALL_CCOMPFLAGS) $(ALL_CFLAGS) # -fpostpass-ilp
+K1C_CCOMPFLAGS=-O3 -Wall $(ALL_CCOMPFLAGS) $(ALL_CFLAGS) # -fpostpass= revlist
EXECUTE=k1-cluster --syscall=libstd_scalls.so --
EXECUTE_CYCLES=k1-cluster --syscall=libstd_scalls.so --cycle-based --