mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
AsmPrinter: Store abbreviation data directly in DIE and DIEValue
Stop storing a `DIEAbbrev` in `DIE`, since the data fits neatly inside the `DIEValue` list. Besides being a cleaner data structure (avoiding the parallel arrays), this gives us more freedom to rearrange the `DIEValue` list. This fixes the temporary memory regression from 845 MB up to 879 MB, and drops it further to 829 MB for a net memory decrease of around 1.9% (incremental decrease around 5.7%). (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@238364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -51,8 +51,10 @@ void DwarfCompileUnit::addLocalLabelAddress(DIE &Die,
|
||||
if (Label)
|
||||
DD->addArangeLabel(SymbolCU(this, Label));
|
||||
|
||||
Die.addValue(Attribute, dwarf::DW_FORM_addr,
|
||||
Label ? DIEValue(DIELabel(Label)) : DIEValue(DIEInteger(0)));
|
||||
if (Label)
|
||||
Die.addValue(Attribute, dwarf::DW_FORM_addr, DIELabel(Label));
|
||||
else
|
||||
Die.addValue(Attribute, dwarf::DW_FORM_addr, DIEInteger(0));
|
||||
}
|
||||
|
||||
unsigned DwarfCompileUnit::getOrCreateSourceID(StringRef FileName,
|
||||
@@ -253,9 +255,7 @@ void DwarfCompileUnit::initStmtList() {
|
||||
}
|
||||
|
||||
void DwarfCompileUnit::applyStmtList(DIE &D) {
|
||||
D.addValue(dwarf::DW_AT_stmt_list,
|
||||
UnitDie.getAbbrev().getData()[stmtListIndex].getForm(),
|
||||
UnitDie.getValues()[stmtListIndex]);
|
||||
D.addValue(UnitDie.getValues()[stmtListIndex]);
|
||||
}
|
||||
|
||||
void DwarfCompileUnit::attachLowHighPC(DIE &D, const MCSymbol *Begin,
|
||||
|
Reference in New Issue
Block a user