[lld] [lld][ELF] Extend profile guided function ordering to ELF binaries (PR #117514)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 16 04:58:02 PST 2024
================
@@ -102,16 +102,41 @@ class BPSectionELF : public BPSectionBase {
§ionToIdx) const override {
constexpr unsigned windowSize = 4;
- // Calculate content hashes
size_t size = isec->content().size();
for (size_t i = 0; i < size; i++) {
auto window = isec->content().drop_front(i).take_front(windowSize);
hashes.push_back(xxHash64(window));
}
- // TODO: Calculate relocation hashes.
- // Since in ELF, relocations are complex, but the effect without them are
- // good enough, we just use 0 as their hash.
+ for (const auto &r : isec->relocations) {
----------------
Colibrow wrote:
I'm sorry I just saw this now. I'll give a test and post the results asap.
https://github.com/llvm/llvm-project/pull/117514
More information about the llvm-commits
mailing list