Skip to content

Commit

Permalink
application: Add optimization flags for ZCC toolchain.
Browse files Browse the repository at this point in the history
  • Loading branch information
jupiter-zzp authored and fanghuaqi committed Mar 29, 2024
1 parent 0be7024 commit a8df307
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
BENCH_FLAGS ?= -O3 -flto
BENCH_FLAGS ?= -O3 -flto -falign-functions=4 -falign-loops=4 -flate-loop-unroll -malign-branch
LDFLAGS += -Wl,-mllvm,--align-all-nofallthru-blocks=2
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
ifeq ($(DHRY_MODE),ground)
BENCH_FLAGS ?= -O3 -flto -fno-inline -fno-builtin-printf -funroll-loops -falign-functions=4 -falign-loops=4
BENCH_FLAGS ?= -Ofast -flto -fno-inline -fno-builtin-printf -funroll-loops -falign-functions=4 -falign-loops=4 -flate-loop-unroll -malign-branch
LDFLAGS += -Wl,-mllvm,--align-all-nofallthru-blocks=2
else ifeq ($(DHRY_MODE),best)
BENCH_FLAGS ?= -Ofast -flto -finline -fno-builtin-printf -funroll-loops -falign-functions=4 -falign-loops=4 -finline-functions
BENCH_FLAGS ?= -Ofast -flto -finline -fno-builtin-printf -funroll-loops -falign-functions=4 -falign-loops=4 -finline-functions -flate-loop-unroll -malign-branch
LDFLAGS += -Wl,-mllvm,--align-all-nofallthru-blocks=2
else ifeq ($(DHRY_MODE),inline)
BENCH_FLAGS ?= -O3 -flto -finline -fno-builtin-printf -funroll-loops -falign-functions=4 -falign-loops=4 -finline-functions
BENCH_FLAGS ?= -O3 -flto -finline -fno-builtin-printf -funroll-loops -falign-functions=4 -falign-loops=4 -finline-functions -flate-loop-unroll -malign-branch
LDFLAGS += -Wl,-mllvm,--align-all-nofallthru-blocks=2
endif

0 comments on commit a8df307

Please sign in to comment.