https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44563
--- Comment #24 from Richard Biener <rguenth at gcc dot gnu.org> --- So in gimple_expand_calls_inline we could look only at BBs last stmt for the actual inlining but for the rest just do the basic-block splitting. And then perform that walk backwards. This should remove the quadraticness that arises when expanding many calls inline from a single basic-block.