On Thu, 2024-11-14 at 16:38 -0800, Alexei Starovoitov wrote: [...] > > The 101m -> 116m is for inlining w/o known branch removal -> inlining with branch removal. > > (With 76m being no inlining at all). > > Not following. Which patch # does branch removal then? - "bpf: shared BPF/native kfuncs" (patch #3) Build system integration and kfuncs inlining after verification. - "bpf: instantiate inlinable kfuncs before verification" (patch #7) Adds a pass that clones inlinable kfunc bodies as hidden subprograms, one subprogram per callsite. #3 does inlining, but does not remove any branches. #7 moves where inlining is done which allows to remove branches. Performance numbers for the simple test: - #3 alone : 76m -> 101m - #3 + #7 : 76m -> 116m