Help testing llvm patch to generate verifier friendly code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have spent some time to add additional logic in llvm BPF backend
in order to generate verifier friendly code.

The first patch is:
  https://reviews.llvm.org/D87153
which moves CORE relocation builtin handling from in late IR
optimization (after inlining and major optimizations)
to in early IR optimization (before inlining and any optimizations).
The reason is to prevent harmful CSEs.

But this change may change how compiler do optimizations.
The patch can pass bpf selftests in latest bpf-next.
Andrii helped it can also pass bcc/libbpf-tools.

If your code uses COREs, esp. having a lot of subroutines
and/or loops, it would be good to give a try with new patch
to see whether there are any issues or not. In my case,
for one of our internal applications with lots of subroutines
and loops, inlining all subroutines and unrolling all loops
will cause register spills which cannot be handled by
the verifier, while existing llvm won't have issue.

FYI, I have two more patches (still need tuning) in pipeline:
  https://reviews.llvm.org/D85570 to serialize code across control flows
  https://reviews.llvm.org/D87428 to avoid repeated condition evaluation

Thanks,

Yonghong



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux