This patch adds the DFAJumpThreading pass into the LTO default pipeline
after the peephole optimization passes. This increases the Coremark
score when LTO is used. I've measured an increase of the score with
roughly 11% on Linux-x86_64 (and we've experienced a similar growth in
case of different RISCV architectures at Codasip).
Here is the primitive Makefile I used with the latest Coremark:
SOURCES=core_list_join.c core_main.c core_matrix.c core_state.c core_util.c posix/core_portme.c DEFINITIONS=-DHAS_PRINTF=1 -DHAS_STDIO=1 -DTIMES=1 -DITERATIONS=1 CC=/home/gabor.marton/WORK/llvm2/build/release/bin/clang OBJS=$(SOURCES:%.c=build_x86_64/%.o) CFLAGS=-I./posix -I. -DCOMPILER_FLAGS=\"N/A\" \ -O3\ -flto\ LDFLAGS=-O3\ -flto\ -Wl,--plugin-opt=-enable-dfa-jump-thread\ build_x86_64/coremark.xexe: $(OBJS) $(CC) -o $@ $(OBJS) \ $(LDFLAGS) build_x86_64/%.o: %.c mkdir -p build_x86_64 mkdir -p build_x86_64/posix $(CC) -c -o $@ $< $(CFLAGS) $(DEFINITIONS)
Co-author: Martin Ministr (Codasip.com)
Co-author: Pavel Snobl (Codasip.com)
And CE is here as well…