[PATCH] D87813: [llvm][lld] Add an option to emit cold clusters to a different section.

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 10:18:07 PDT 2020


snehasish added inline comments.


================
Comment at: lld/ELF/Writer.cpp:134
   // will be kept in the ".text.unknown" section.
+  // ".text.split." holds symbols which are split out from functions in other
+  // input sections. For example, with -fsplit-machine-functions, placing the
----------------
MaskRay wrote:
> I think I will need to read your first LLVM patch to get some basic understanding of machine function splitter. I'd suggest you split the lld patch from the codegen one.
> 
> For your future lld patch: why can't the split sections be placed in `.test.cold`? This just affects how `-z keep-text-section-prefix` groups input sections into output sections. With the additional element, there may be an output section .text.split but if its purpose is similar to the others I am not sure you need it.
Thanks, here's a link to the RFC for your reference: https://groups.google.com/g/llvm-dev/c/RUegaMg-iqc/m/wFAVxa6fCgAJ
I've split out the LLD change as a separate patch: D87840

I'll add the discussion for the rationale behind a new output section in the D87840 (assuming that you mean ".text.unlikely" instead of ".test.cold").


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87813



More information about the llvm-commits mailing list