[PATCH] D36351: [lld][ELF] Add profile guided section layout
Michael Spencer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 5 15:52:31 PDT 2018
Bigcheese added inline comments.
================
Comment at: ELF/CallGraphSort.cpp:56
+namespace {
+using SectionIndex = int32_t;
+using EdgeIndex = int32_t;
----------------
espindola wrote:
> Delete these typedefs and just use the proper type directly.
>
That would significantly reduce code clarity. It's not uncommon in LLVM to do this. LLD even has a case of this with Relocations.h RelType.
================
Comment at: ELF/Driver.cpp:602
+ uint64_t &C = Config->CallGraphProfile[std::make_pair(FromSym, ToSym)];
+ C = SaturatingAdd(C, Count);
+ }
----------------
espindola wrote:
> This means that we supports having duplicated symbol edges. Is there a reason for that? If not please change this to report an error on duplicated edges.
>
This makes it easier to create input. For instance you can cat together profiles from different runs.
https://reviews.llvm.org/D36351
More information about the llvm-commits
mailing list