mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
AsmPrinter: Use an intrusively linked list for DIE::Children
Replace the `std::vector<>` for `DIE::Children` with an intrusively linked list. This is a strict memory improvement: it requires no auxiliary storage, and reduces `sizeof(DIE)` by one pointer. It also factors out the DIE-related malloc traffic. This drops llc memory usage from 735 MB down to 718 MB, or ~2.3%. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240736 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -111,7 +111,7 @@ unsigned DwarfFile::computeSizeAndOffset(DIE &Die, unsigned Offset) {
|
||||
assert(Abbrev.hasChildren() && "Children flag not set");
|
||||
|
||||
for (auto &Child : Die.children())
|
||||
Offset = computeSizeAndOffset(*Child, Offset);
|
||||
Offset = computeSizeAndOffset(Child, Offset);
|
||||
|
||||
// End of children marker.
|
||||
Offset += sizeof(int8_t);
|
||||
|
Reference in New Issue
Block a user