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

Ruijie Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 00:17:02 PDT 2020


rjf added a comment.

@vsk Apologies for the late reply. Here is the data on split delta = 5 vs split delta = 0, on firefox compiled with -O2, with all main dynamic libraries accounted for:
delta=5: 2.295487064 GiB
delta=0: 2.291473384 GiB

So yes, it does seem like there is a slight regression (I'm still running the test with -Os and negative deltas unfortunately; for some reason firefox -Os builds are taking more than 6 hours on my local build of clang/llvm, so PGO-enabled builds end up taking more than a day, and doing the two tests ended up taking more than a weekend.)
I'd also like to remark that we also tested another design (as suggested by @rcorcs) to have HCS called in the inliner before every inlining; although we managed to split more blocks, the code size also goes up slightly above 2.3GiB.

Also I'd just like to mention that I have manually merged your patch (D57265 <https://reviews.llvm.org/D57265>) adding cc1 options for hotcoldsplit to clang and it's working smoothly. I'm wondering if you're thinking about landing it anytime soon, and if there's anything I could help to land it?

For reproduceability, here's the build instructions for firefox with hotcoldsplit enabled: https://gist.github.com/ruijiefang/ce6e3c8c471e1e24967869a34af4357b. The only thing we had to change was part of the build script, where we explicitly disable hotcoldsplit for the instrumentation build, and explicitly enable hotcoldsplit for the profile-driven build.


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