Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
llvm-watermarker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nagayama15
llvm-watermarker
Commits
7481767e
Commit
7481767e
authored
Dec 14, 2018
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ベンチマーク用プログラムを4種類用意
parent
f5292cf0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
8 deletions
+33
-8
Makefile
example/zlib/Makefile
+31
-6
aggregate.zsh
scripts/aggregate.zsh
+2
-2
No files found.
example/zlib/Makefile
View file @
7481767e
...
...
@@ -37,36 +37,55 @@ SRCS := \
zlib/zutil.c
OBJS
:=
${
SRCS
:zlib/%.c
=
${
OBJ_DIR
}
/zlib/%.o
}
OBJS_BWM
:=
${
SRCS
:zlib/%.c
=
${
OBJ_DIR
}
/zlib-block-wm/%.o
}
OBJS_IWM
:=
${
SRCS
:zlib/%.c
=
${
OBJ_DIR
}
/zlib-inst-wm/%.o
}
OBJS_WM
:=
${
SRCS
:zlib/%.c
=
${
OBJ_DIR
}
/zlib-wm/%.o
}
.PHONY
:
all test
all
:
\
${BIN_DIR}/libz.a
\
${BIN_DIR}/libz-wm.a
\
${BIN_DIR}/test
\
${BIN_DIR}/test-block-wm
\
${BIN_DIR}/test-inst-wm
\
${BIN_DIR}/test-wm
test
:
\
${BIN_DIR}/libz.a
\
${BIN_DIR}/libz-wm.a
\
${BIN_DIR}/test
\
${BIN_DIR}/test-block-wm
\
${BIN_DIR}/test-inst-wm
\
${BIN_DIR}/test-wm
${BIN_DIR}/libz.a
:
${OBJS}
${BIN_DIR}/libz-block-wm.a
:
${OBJS_BWM}
${BIN_DIR}/libz-inst-wm.a
:
${OBJS_IWM}
${BIN_DIR}/libz-wm.a
:
${OBJS_WM}
${BIN_DIR}/test
:
${OBJ_DIR}/test.o ${BIN_DIR}/libz.a
${BIN_DIR}/test-block-wm
:
${OBJ_DIR}/test.o ${BIN_DIR}/libz-block-wm.a
${BIN_DIR}/test-inst-wm
:
${OBJ_DIR}/test.o ${BIN_DIR}/libz-inst-wm.a
${BIN_DIR}/test-wm
:
${OBJ_DIR}/test.o ${BIN_DIR}/libz-wm.a
${OBJ_DIR}/zlib/%.o
:
zlib/%.c
@
mkdir
-p
${
@D
}
${
CC
}
${
CFLAGS
}
-o
$@
-c
$<
${OBJ_DIR}/zlib-wm/%.o
:
zlib/%.c
${OBJ_DIR}/zlib-
block-
wm/%.o
:
zlib/%.c
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-emit-llvm
-S
-o
${
@
:.o
=.ll
}
$<
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-block-wm.ll
}
${
@
:.o
=.ll
}
2>
${
@
:%.o
=%-block-wm.txt
}
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-inst-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-inst-wm.ll
}
${
@
:.o
=-block-wm.ll
}
2>
${
@
:%.o
=%-inst-wm.txt
}
clang
${
CFLAGS
}
-o
$@
-c
${
@
:%.o
=%-block-wm.ll
}
${OBJ_DIR}/zlib-inst-wm/%.o
:
zlib/%.c
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-emit-llvm
-S
-o
${
@
:.o
=.ll
}
$<
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-inst-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-inst-wm.ll
}
${
@
:.o
=.ll
}
2>
${
@
:%.o
=%-inst-wm.txt
}
clang
${
CFLAGS
}
-o
$@
-c
${
@
:%.o
=%-inst-wm.ll
}
${OBJ_DIR}/zlib-wm/%.o
:
zlib/%.c
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-emit-llvm
-S
-o
${
@
:.o
=.ll
}
$<
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-block-wm.ll
}
${
@
:.o
=.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
}
${OBJ_DIR}/test.o
:
test.cpp
...
...
@@ -75,6 +94,12 @@ ${OBJ_DIR}/test.o: test.cpp
${BIN_DIR}/test
:
${
CXX
}
${
CXXFLAGS
}
-o
$@
$^
${
LDFLAGS
}
${BIN_DIR}/test-block-wm
:
${
CXX
}
${
CXXFLAGS
}
-o
$@
$^
${
LDFLAGS
}
${BIN_DIR}/test-inst-wm
:
${
CXX
}
${
CXXFLAGS
}
-o
$@
$^
${
LDFLAGS
}
${BIN_DIR}/test-wm
:
${
CXX
}
${
CXXFLAGS
}
-o
$@
$^
${
LDFLAGS
}
...
...
scripts/aggregate.zsh
View file @
7481767e
...
...
@@ -45,7 +45,7 @@ h2() {
}
h1 obj/example/8cc/stage1-wm/
*
-block-wm
.txt
h1 obj/example/zlib/zlib-wm/
*
-block-wm
.txt
h1 obj/example/zlib/zlib-
block-
wm/
*
-block-wm
.txt
h2 obj/example/8cc/stage1-wm/
*
-inst-wm
.txt
h2 obj/example/zlib/zlib-wm/
*
-inst-wm
.txt
h2 obj/example/zlib/zlib-
inst-
wm/
*
-inst-wm
.txt
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment