[PATCH] D36351: [lld][ELF] Add profile guided section layout

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 13 10:24:07 PDT 2018


espindola added inline comments.


================
Comment at: ELF/Config.h:108
   std::vector<uint8_t> BuildIdVector;
+  llvm::MapVector<std::pair<const Symbol *, const Symbol *>, uint64_t>
+      CallGraphProfile;
----------------
Using Symbol in here causes some duplication. We support duplicated edges, and we have to support two symbols pointing to the same section. This means two maps, this one for symbols and one for edges from section to section.

If this map is changed to directly map from section to section, we can avoid the second map completely:

https://reviews.llvm.org/D45630



https://reviews.llvm.org/D36351





More information about the llvm-commits mailing list