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

Michael Spencer via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 16 11:27:40 PDT 2018


On Fri, Apr 13, 2018 at 10:24 AM, Rafael Avila de Espindola via Phabricator
<reviews at reviews.llvm.org> wrote:

> 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
>
>
>
>
Note that doing this means that when reading the call graph profile from
object files we have to keep a separate sym->sym map until the same time we
read the text file, although that shouldn't be too much of an issue.

- Michael Spencer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180416/25771f24/attachment.html>


More information about the llvm-commits mailing list