[PATCH] Do not use layout-before to layout atoms.

kledzik at apple.com kledzik at apple.com
Wed Mar 26 14:23:43 PDT 2014

  Given your description of COFF, I'm not sure follow-on atom/references is the right model.

  We probably want a way to order sections.  For instance, the darwin linker automatically arranges sections for best performance.

  If in LayoutPass, compareAtomsSub() was enhanced to sort sections, then all COFF would need to do is have .text$a sort before .text$b and then atoms would be all laid out in the order you want.  The COFF Writer could then ignore the trailing $blah and put the range of atoms from all .text$* sections into one .text section.

  In terms of improving performance of this pass, we could add a flag to the MergedFile that indicates if any Atom in it has a follow-on (layout before or layout after reference).  If there are none (which is common for COFF and mach-o), then all the _followOnRoots and _followOnNexts set up can be skipped.


More information about the llvm-commits mailing list