-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selftests/bpf: Fix pyperf180 compilation failure with llvm18 #658
Conversation
Upstream branch: b4e59c1 |
d955544
to
dc3526c
Compare
Upstream branch: b4e59c1 |
74ae083
to
44730f1
Compare
902178a
to
bc1b833
Compare
Upstream branch: 3815f89 |
44730f1
to
e2b91a5
Compare
0fbe9f3
to
b0d20d2
Compare
Upstream branch: 6f101db |
e2b91a5
to
838b402
Compare
1e02037
to
a98cbca
Compare
Upstream branch: e80742d |
838b402
to
1c45772
Compare
a98cbca
to
b7b6ef0
Compare
Upstream branch: e80742d |
1c45772
to
4103899
Compare
b7b6ef0
to
293e027
Compare
Upstream branch: e80742d |
4103899
to
32a9ec8
Compare
293e027
to
260b428
Compare
Upstream branch: e80742d |
32a9ec8
to
d6c14bd
Compare
260b428
to
08949e6
Compare
With latest llvm18 (main branch of llvm-project repo), when building bpf selftests, [~/work/bpf-next (master)]$ make -C tools/testing/selftests/bpf LLVM=1 -j The following compilation error happens: fatal error: error in backend: Branch target out of insn range ... Stack dump: 0. Program arguments: clang -g -Wall -Werror -D__TARGET_ARCH_x86 -mlittle-endian -I/home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/include -I/home/yhs/work/bpf-next/tools/testing/selftests/bpf -I/home/yhs/work/bpf-next/tools/include/uapi -I/home/yhs/work/bpf-next/tools/testing/selftests/usr/include -idirafter /home/yhs/work/llvm-project/llvm/build.18/install/lib/clang/18/include -idirafter /usr/local/include -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 --target=bpf -c progs/pyperf180.c -mcpu=v3 -o /home/yhs/work/bpf-next/tools/testing/selftests/bpf/pyperf180.bpf.o 1. <eof> parser at end of file 2. Code generation ... The compilation failure only happens to cpu=v2 and cpu=v3. cpu=v4 is okay since cpu=v4 supports 32-bit branch target offset. The above failure is due to upstream llvm patch [1] where some inlining behavior are changed in llvm18. To workaround the issue, previously all 180 loop iterations are fully unrolled. Now, the fully unrolling count is changed to 90 for llvm18 and later. This reduced some otherwise long branch target distance, and fixed the compilation failure. [1] llvm/llvm-project@1a2e77c Signed-off-by: Yonghong Song <[email protected]> Tested-by: Eduard Zingerman <[email protected]>
Upstream branch: 155addf |
d6c14bd
to
08dfd3a
Compare
08949e6
to
3a8c9bf
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=799825 expired. Closing PR. |
Pull request for series with
subject: selftests/bpf: Fix pyperf180 compilation failure with llvm18
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=799825