[PATCH] D75498: [llvm-objdump] Add option to sort symbols during disassembly
Stephen Neuendorffer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 15:46:23 PST 2020
stephenneuendorffer added inline comments.
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1343-1344
std::string SymbolName = Symbols[SI].Name.str();
if (Demangle)
SymbolName = demangle(SymbolName);
----------------
stephenneuendorffer wrote:
> rupprecht wrote:
> > Demangling should happen earlier, so that the symbols are also sorted when demangled
> Makes sense.
Except.... that this means allocating space for all the demangled strings, which would have a more significant memory, or a more significant runtime cost to demangling during sorting. Currently, the sorting just happens on StringRefs...
My intuition says that mangling shouldn't change the resulting order significantly (although it might mean that some mangled symbol foo(...)) might get reordered with a non-mangled symbol _foo, but this seems minimally concerning to me?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75498/new/
https://reviews.llvm.org/D75498
More information about the llvm-commits
mailing list