Commit b40c6c4f authored by nagayama15's avatar nagayama15

ベンチマークプログラムのファイル名を変更

parent fd351396
...@@ -13,11 +13,7 @@ test: ...@@ -13,11 +13,7 @@ test:
${MAKE} -C example test ${MAKE} -C example test
benchmark: test benchmark: test
bin/example/zlib/test | tee bin/example/zlib/test.txt ${MAKE} -C example benchmark
bin/example/zlib/test-block-wm | tee bin/example/zlib/test-block-wm.txt
bin/example/zlib/test-inst-wm | tee bin/example/zlib/test-inst-wm.txt
bin/example/zlib/test-wm | tee bin/example/zlib/test-wm.txt
paste -d"," bin/example/zlib/test.txt bin/example/zlib/test-block-wm.txt bin/example/zlib/test-inst-wm.txt bin/example/zlib/test-wm.txt > bin/example/zlib/test.csv
clean:: clean::
${MAKE} -C example clean ${MAKE} -C example clean
...@@ -14,5 +14,8 @@ test: ...@@ -14,5 +14,8 @@ test:
${MAKE} -C fizzbuzz-rs test ${MAKE} -C fizzbuzz-rs test
${MAKE} -C numguess-rs test ${MAKE} -C numguess-rs test
benchmark:
${MAKE} -C zlib benchmark
clean:: clean::
${MAKE} -C numguess-rs clean ${MAKE} -C numguess-rs clean
...@@ -44,26 +44,33 @@ OBJS_WM := ${SRCS:zlib/%.c=${OBJ_DIR}/zlib-wm/%.o} ...@@ -44,26 +44,33 @@ OBJS_WM := ${SRCS:zlib/%.c=${OBJ_DIR}/zlib-wm/%.o}
.PHONY: all test .PHONY: all test
all: \ all: \
${BIN_DIR}/test \ ${BIN_DIR}/benchmark \
${BIN_DIR}/test-block-wm \ ${BIN_DIR}/benchmark-block-wm \
${BIN_DIR}/test-inst-wm \ ${BIN_DIR}/benchmark-inst-wm \
${BIN_DIR}/test-wm ${BIN_DIR}/benchmark-wm
test: \ test: \
${BIN_DIR}/test \ ${BIN_DIR}/benchmark \
${BIN_DIR}/test-block-wm \ ${BIN_DIR}/benchmark-block-wm \
${BIN_DIR}/test-inst-wm \ ${BIN_DIR}/benchmark-inst-wm \
${BIN_DIR}/test-wm ${BIN_DIR}/benchmark-wm
benchmark:
${BIN_DIR}/benchmark | tee ${BIN_DIR}/benchmark.txt
${BIN_DIR}/benchmark-block-wm | tee ${BIN_DIR}/benchmark-block-wm.txt
${BIN_DIR}/benchmark-inst-wm | tee ${BIN_DIR}/benchmark-inst-wm.txt
${BIN_DIR}/benchmark-wm | tee ${BIN_DIR}/benchmark-wm.txt
paste -d"," ${BIN_DIR}/benchmark.txt ${BIN_DIR}/benchmark-block-wm.txt ${BIN_DIR}/benchmark-inst-wm.txt ${BIN_DIR}/benchmark-wm.txt > ${BIN_DIR}/benchmark.csv
${BIN_DIR}/libz.a: ${OBJS} ${BIN_DIR}/libz.a: ${OBJS}
${BIN_DIR}/libz-block-wm.a: ${OBJS_BWM} ${BIN_DIR}/libz-block-wm.a: ${OBJS_BWM}
${BIN_DIR}/libz-inst-wm.a: ${OBJS_IWM} ${BIN_DIR}/libz-inst-wm.a: ${OBJS_IWM}
${BIN_DIR}/libz-wm.a: ${OBJS_WM} ${BIN_DIR}/libz-wm.a: ${OBJS_WM}
${BIN_DIR}/test: ${OBJ_DIR}/test.o ${BIN_DIR}/libz.a ${BIN_DIR}/benchmark: ${OBJ_DIR}/benchmark.o ${BIN_DIR}/libz.a
${BIN_DIR}/test-block-wm: ${OBJ_DIR}/test.o ${BIN_DIR}/libz-block-wm.a ${BIN_DIR}/benchmark-block-wm: ${OBJ_DIR}/benchmark.o ${BIN_DIR}/libz-block-wm.a
${BIN_DIR}/test-inst-wm: ${OBJ_DIR}/test.o ${BIN_DIR}/libz-inst-wm.a ${BIN_DIR}/benchmark-inst-wm: ${OBJ_DIR}/benchmark.o ${BIN_DIR}/libz-inst-wm.a
${BIN_DIR}/test-wm: ${OBJ_DIR}/test.o ${BIN_DIR}/libz-wm.a ${BIN_DIR}/benchmark-wm: ${OBJ_DIR}/benchmark.o ${BIN_DIR}/libz-wm.a
${OBJ_DIR}/zlib/%.o: zlib/%.c ${OBJ_DIR}/zlib/%.o: zlib/%.c
@mkdir -p ${@D} @mkdir -p ${@D}
...@@ -88,23 +95,23 @@ ${OBJ_DIR}/zlib-wm/%.o: zlib/%.c ...@@ -88,23 +95,23 @@ ${OBJ_DIR}/zlib-wm/%.o: zlib/%.c
opt -load=${ROOT}/bin/src/nykk.so -inst-wm -watermark=${WATERMARK} -S -o ${@:%.o=%-inst-wm.ll} ${@:.o=-block-wm.ll} 2> /dev/null opt -load=${ROOT}/bin/src/nykk.so -inst-wm -watermark=${WATERMARK} -S -o ${@:%.o=%-inst-wm.ll} ${@:.o=-block-wm.ll} 2> /dev/null
clang ${CFLAGS} -o $@ -c ${@:%.o=%-inst-wm.ll} clang ${CFLAGS} -o $@ -c ${@:%.o=%-inst-wm.ll}
${OBJ_DIR}/test.o: test.cpp ${OBJ_DIR}/benchmark.o: benchmark.cpp
@mkdir -p ${@D} @mkdir -p ${@D}
${CXX} ${CXXFLAGS} -o $@ -c $< ${CXX} ${CXXFLAGS} -o $@ -c $<
${BIN_DIR}/test: ${BIN_DIR}/benchmark:
@mkdir -p ${@D} @mkdir -p ${@D}
${CXX} ${CXXFLAGS} -o $@ $^ ${LDFLAGS} ${CXX} ${CXXFLAGS} -o $@ $^ ${LDFLAGS}
${BIN_DIR}/test-block-wm: ${BIN_DIR}/benchmark-block-wm:
@mkdir -p ${@D} @mkdir -p ${@D}
${CXX} ${CXXFLAGS} -o $@ $^ ${LDFLAGS} ${CXX} ${CXXFLAGS} -o $@ $^ ${LDFLAGS}
${BIN_DIR}/test-inst-wm: ${BIN_DIR}/benchmark-inst-wm:
@mkdir -p ${@D} @mkdir -p ${@D}
${CXX} ${CXXFLAGS} -o $@ $^ ${LDFLAGS} ${CXX} ${CXXFLAGS} -o $@ $^ ${LDFLAGS}
${BIN_DIR}/test-wm: ${BIN_DIR}/benchmark-wm:
@mkdir -p ${@D} @mkdir -p ${@D}
${CXX} ${CXXFLAGS} -o $@ $^ ${LDFLAGS} ${CXX} ${CXXFLAGS} -o $@ $^ ${LDFLAGS}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment