IR: Use SmallVector instead of std::vector of TrackingMDRef
Don't use std::vector<TrackingMDRef>, since (at least in some versions of libc++) std::vector apparently copies values on grow operations instead of moving them. Found this when I was temporarily deleting the copy constructor for TrackingMDRef to investigate a performance bottleneck. llvm-svn: 266909
This commit is contained in:
@@ -614,7 +614,7 @@ DIGlobalVariable *DIBuilder::createTempGlobalVariableFwdDecl(
|
||||
|
||||
static DILocalVariable *createLocalVariable(
|
||||
LLVMContext &VMContext,
|
||||
DenseMap<MDNode *, std::vector<TrackingMDNodeRef>> &PreservedVariables,
|
||||
DenseMap<MDNode *, SmallVector<TrackingMDNodeRef, 1>> &PreservedVariables,
|
||||
DIScope *Scope, StringRef Name, unsigned ArgNo, DIFile *File,
|
||||
unsigned LineNo, DIType *Ty, bool AlwaysPreserve, unsigned Flags) {
|
||||
// FIXME: Why getNonCompileUnitScope()?
|
||||
|
||||
Reference in New Issue
Block a user