[PATCH] D134600: [RISCV][LLD] Add RISCV zcmt optimise in linker relaxation
Xinlong Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 26 06:29:53 PDT 2022
VincentWu added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:1237
+ std::back_inserter(finalizedEntriesZero));
+ std::sort(finalizedEntriesZero.begin(), finalizedEntriesZero.end(), cmp);
+ if (finalizedEntriesZero.size() > maxSizeZero)
----------------
> We only need to record symbol name for finalEntries, so std::vector<std::string> is enough?
yep but we need sort it in descending order by the number of jumps.
it will be spand more linking time to copy again.
so I chose memory space instead of time.
did you mean it is acceptable if i spend more time to copy it again?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134600/new/
https://reviews.llvm.org/D134600
More information about the llvm-commits
mailing list