[PATCH] D84468: [HotColdSplitting] Add SplittingDelta option to enable splitting more small blocks

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 19:35:29 PDT 2020


hiraditya added a comment.

In D84468#2183505 <https://reviews.llvm.org/D84468#2183505>, @vsk wrote:

> @rjf thanks for sharing those numbers!
>
> In my testing, I found that it's actually necessary to radically increase the outlining penalty in order to avoid pathological code size growth (see https://reviews.llvm.org/D59715 -- which, incidentally, I would still love to upstream -- review would be very much appreciated). This evaluation was done across several thousand projects at Apple (most of which are built at -Os, although some firmware is built at -Oz and the kernel at -O3).
>
> A big potential problem with splitting out a block and replacing it with a call is that the replacement call can actually be more expensive to codegen than the extracted block. This 100% defeats the purpose of splitting. This happens because, depending on what exactly is being extracted, there can be a (large) number of inputs/outputs to the extraction region, and these ratchet up register pressure at the extraction site. This is what https://reviews.llvm.org/D59715 tries to account for.

Sorry never visited this patch. This is super useful! Please update the diff and I'll accept it.

> That is why I'm pushing for getting more hard __text section code size numbers (not simply # blocks extracted, as this can be misleading). In the experiments I've done in the past, I got the strong impression that we needed to make splitting _less_ aggressive (hence D59715 <https://reviews.llvm.org/D59715>).




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84468/new/

https://reviews.llvm.org/D84468



More information about the llvm-commits mailing list