[PATCH] D36351: [lld][ELF] Add profile guided section layout
Rafael Avila de Espindola via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 2 18:05:22 PDT 2018
espindola added inline comments.
================
Comment at: ELF/CallGraphSort.cpp:56
+namespace {
+using SectionIndex = int32_t;
+using EdgeIndex = int32_t;
----------------
Delete these typedefs and just use the proper type directly.
================
Comment at: ELF/CallGraphSort.cpp:148
+
+bool Edge::operator==(const Edge &Other) const {
+ return From == Other.From && To == Other.To;
----------------
Define this inline.
================
Comment at: ELF/Driver.cpp:602
+ uint64_t &C = Config->CallGraphProfile[std::make_pair(FromSym, ToSym)];
+ C = SaturatingAdd(C, Count);
+ }
----------------
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.
https://reviews.llvm.org/D36351
More information about the llvm-commits
mailing list