mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Stop the ValueMapper from calling getAllMetadata, which unpacks DebugLoc into
an MDNode. This saves a bunch of time and memory in the IR linker, e.g. when doing LTO of files with debug info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -167,9 +167,10 @@ void llvm::RemapInstruction(Instruction *I, ValueToValueMapTy &VMap,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remap attached metadata.
|
// Remap attached metadata. Don't bother remapping DebugLoc, it can never
|
||||||
|
// have mappings to do.
|
||||||
SmallVector<std::pair<unsigned, MDNode *>, 4> MDs;
|
SmallVector<std::pair<unsigned, MDNode *>, 4> MDs;
|
||||||
I->getAllMetadata(MDs);
|
I->getAllMetadataOtherThanDebugLoc(MDs);
|
||||||
for (SmallVectorImpl<std::pair<unsigned, MDNode *> >::iterator
|
for (SmallVectorImpl<std::pair<unsigned, MDNode *> >::iterator
|
||||||
MI = MDs.begin(), ME = MDs.end(); MI != ME; ++MI) {
|
MI = MDs.begin(), ME = MDs.end(); MI != ME; ++MI) {
|
||||||
MDNode *Old = MI->second;
|
MDNode *Old = MI->second;
|
||||||
|
Reference in New Issue
Block a user