mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Add special case bitcode support for DebugLoc. This avoids
having the bitcode writer materialize mdnodes for all the debug location tuples when writing out the bc file and stores the information in a more compact form. For example, the -O0 -g bc file for combine.c in 176.gcc shrinks from 739392 to 512096 bytes. This concludes my planned short-term debug info work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100261 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -104,9 +104,16 @@ ValueEnumerator::ValueEnumerator(const Module *M) {
|
||||
|
||||
// Enumerate metadata attached with this instruction.
|
||||
MDs.clear();
|
||||
I->getAllMetadata(MDs);
|
||||
I->getAllMetadataOtherThanDebugLoc(MDs);
|
||||
for (unsigned i = 0, e = MDs.size(); i != e; ++i)
|
||||
EnumerateMetadata(MDs[i].second);
|
||||
|
||||
if (!I->getDebugLoc().isUnknown()) {
|
||||
MDNode *Scope, *IA;
|
||||
I->getDebugLoc().getScopeAndInlinedAt(Scope, IA, I->getContext());
|
||||
if (Scope) EnumerateMetadata(Scope);
|
||||
if (IA) EnumerateMetadata(IA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user