[llvm-commits] [PATCH] Delete the CompileUnits that DwarfDebug allocates

Devang Patel dpatel at apple.com
Mon Mar 8 10:21:24 PST 2010


Hi Jeffrey,

In fact, I have a patch in my queue (which was waiting for 2.7 branch) that deletes CompileUnits itself. I should be able to apply it to mainline in a day or so.
-
Devang
On Mar 6, 2010, at 1:51 AM, Jeffrey Yasskin wrote:

> DwarfDebug new's CompileUnits in beginModule() but never deleted them.
> This patch deletes them in endModule(), but I don't know enough about
> how DwarfDebug is used to know for sure that's right. Please
> double-check it.
> 
> 
> 
> For those curious, the valgrind report _after_ this patch follows.
> DbgVarScope.ll was produced by `Debug/bin/clang -S -O0 -g -emit-llvm
> ../src/test/FrontendC/2010-02-16-DbgVarScope.c -o DbgVarScope.ll`
> 
> 
> 
> $ valgrind --dsymutil=yes --leak-check=full Debug/bin/llc
> DbgVarScope.ll  -o /dev/null
> ==14590== Memcheck, a memory error detector
> ==14590== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
> ==14590== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
> ==14590== Command: Debug/bin/llc
> /Users/jyasskin/src/llvm/clang/obj/DbgVarScope.ll -o /dev/null
> ==14590==
> ==14590== Warning: ignored attempt to set SIGUSR2 handler in sigaction();
> ==14590==          the SIGUSR2 signal is used internally by Valgrind
> ==14590==
> ==14590== HEAP SUMMARY:
> ==14590==     in use at exit: 20,550 bytes in 265 blocks
> ==14590==   total heap usage: 4,197 allocs, 3,932 frees, 830,632 bytes allocated
> ==14590==
> ==14590== 16 bytes in 1 blocks are definitely lost in loss record 15 of 173
> ==14590==    at 0x190FAD3: operator new(unsigned long) (vg_replace_malloc.c:220)
> ==14590==    by 0x22E89B: createX86MCInstPrinter(llvm::Target const&,
> unsigned int, llvm::MCAsmInfo const&, llvm::raw_ostream&)
> (X86AsmPrinter.cpp:640)
> ==14590==    by 0x45DDEF: llvm::Target::createMCInstPrinter(unsigned
> int, llvm::MCAsmInfo const&, llvm::raw_ostream&) const
> (TargetRegistry.h:257)
> ==14590==    by 0x45C66F:
> llvm::LLVMTargetMachine::addPassesToEmitFile(llvm::PassManagerBase&,
> llvm::formatted_raw_ostream&, llvm::TargetMachine::CodeGenFileType,
> llvm::CodeGenOpt::Level, bool) (LLVMTargetMachine.cpp:136)
> ==14590==    by 0x3478: main (llc.cpp:359)
> ==14590==
> ==14590== 22 bytes in 1 blocks are possibly lost in loss record 47 of 173
> ==14590==    at 0x190FAD3: operator new(unsigned long) (vg_replace_malloc.c:220)
> ==14590==    by 0x1B64A69: std::string::_Rep::_S_create(unsigned long,
> unsigned long, std::allocator<char> const&) (in
> /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0x1B65753: char* std::string::_S_construct<char
> const*>(char const*, char const*, std::allocator<char> const&,
> std::forward_iterator_tag) (in /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0x1B65985: std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >::basic_string(char
> const*, unsigned long, std::allocator<char> const&) (in
> /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0xE6F21: llvm::StringRef::str() const (ADT/StringRef.h:148)
> ==14590==    by 0xE28F2: llvm::StringRef::operator std::string() const
> (ADT/StringRef.h:164)
> ==14590==    by 0x7ACEA7: llvm::sys::Path::Path(llvm::StringRef)
> (Unix/Path.inc:82)
> ==14590==    by 0x25F8: GetOutputStream(char const*, char const*) (llc.cpp:137)
> ==14590==    by 0x3018: main (llc.cpp:293)
> ==14590==
> ==14590== 32 bytes in 2 blocks are definitely lost in loss record 131 of 173
> ==14590==    at 0x190FAD3: operator new(unsigned long) (vg_replace_malloc.c:220)
> ==14590==    by 0x1B64A69: std::string::_Rep::_S_create(unsigned long,
> unsigned long, std::allocator<char> const&) (in
> /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0x1B65753: char* std::string::_S_construct<char
> const*>(char const*, char const*, std::allocator<char> const&,
> std::forward_iterator_tag) (in /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0x1B65985: std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >::basic_string(char
> const*, unsigned long, std::allocator<char> const&) (in
> /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0xE6F21: llvm::StringRef::str() const (ADT/StringRef.h:148)
> ==14590==    by 0xE28F2: llvm::StringRef::operator std::string() const
> (ADT/StringRef.h:164)
> ==14590==    by 0x678AD1: llvm::MCSymbol::MCSymbol(llvm::StringRef,
> bool) (MCSymbol.h:60)
> ==14590==    by 0x678888:
> llvm::MCContext::GetOrCreateSymbol(llvm::StringRef) (MCContext.cpp:39)
> ==14590==    by 0x22C07D:
> llvm::X86AsmPrinter::GetGlobalValueSymbol(llvm::GlobalValue const*)
> const (X86AsmPrinter.cpp:59)
> ==14590==    by 0x40E298:
> llvm::DwarfDebug::constructGlobalVariableDIE(llvm::MDNode*)
> (DwarfDebug.cpp:1742)
> ==14590==    by 0x40E746: llvm::DwarfDebug::beginModule(llvm::Module*,
> llvm::MachineModuleInfo*) (DwarfDebug.cpp:1825)
> ==14590==    by 0x42D780:
> llvm::DwarfWriter::BeginModule(llvm::Module*,
> llvm::MachineModuleInfo*, llvm::raw_ostream&, llvm::AsmPrinter*,
> llvm::MCAsmInfo const*) (DwarfWriter.cpp:46)
> ==14590==
> ==14590== 38 bytes in 2 blocks are definitely lost in loss record 136 of 173
> ==14590==    at 0x190FAD3: operator new(unsigned long) (vg_replace_malloc.c:220)
> ==14590==    by 0x1B64A69: std::string::_Rep::_S_create(unsigned long,
> unsigned long, std::allocator<char> const&) (in
> /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0x1B65753: char* std::string::_S_construct<char
> const*>(char const*, char const*, std::allocator<char> const&,
> std::forward_iterator_tag) (in /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0x1B65985: std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >::basic_string(char
> const*, unsigned long, std::allocator<char> const&) (in
> /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0xE6F21: llvm::StringRef::str() const (ADT/StringRef.h:148)
> ==14590==    by 0xE28F2: llvm::StringRef::operator std::string() const
> (ADT/StringRef.h:164)
> ==14590==    by 0x678AD1: llvm::MCSymbol::MCSymbol(llvm::StringRef,
> bool) (MCSymbol.h:60)
> ==14590==    by 0x678888:
> llvm::MCContext::GetOrCreateSymbol(llvm::StringRef) (MCContext.cpp:39)
> ==14590==    by 0x47CFC9:
> llvm::MachineBasicBlock::getSymbol(llvm::MCContext&) const
> (MachineBasicBlock.cpp:50)
> ==14590==    by 0x232BA2:
> llvm::X86MCInstLower::Lower(llvm::MachineInstr const*, llvm::MCInst&)
> const (X86MCInstLower.cpp:236)
> ==14590==    by 0x233B92:
> llvm::X86AsmPrinter::EmitInstruction(llvm::MachineInstr const*)
> (X86MCInstLower.cpp:423)
> ==14590==    by 0x3FCC58: llvm::AsmPrinter::EmitFunctionBody()
> (AsmPrinter.cpp:427)
> ==14590==
> ==14590== 64 bytes in 4 blocks are definitely lost in loss record 143 of 173
> ==14590==    at 0x190FAD3: operator new(unsigned long) (vg_replace_malloc.c:220)
> ==14590==    by 0x4050AC: llvm::DIE::addSiblingOffset() (DIE.cpp:118)
> ==14590==    by 0x410497:
> llvm::DwarfDebug::computeSizeAndOffset(llvm::DIE*, unsigned int, bool)
> (DwarfDebug.cpp:2309)
> ==14590==    by 0x410642:
> llvm::DwarfDebug::computeSizeAndOffset(llvm::DIE*, unsigned int, bool)
> (DwarfDebug.cpp:2338)
> ==14590==    by 0x4106C7: llvm::DwarfDebug::computeSizeAndOffsets()
> (DwarfDebug.cpp:2358)
> ==14590==    by 0x40ED26: llvm::DwarfDebug::endModule() (DwarfDebug.cpp:1912)
> ==14590==    by 0x42D7A9: llvm::DwarfWriter::EndModule() (DwarfWriter.cpp:53)
> ==14590==    by 0x3FCEFA:
> llvm::AsmPrinter::doFinalization(llvm::Module&) (AsmPrinter.cpp:467)
> ==14590==    by 0x72CA76:
> llvm::FPPassManager::doFinalization(llvm::Module&)
> (PassManager.cpp:1389)
> ==14590==    by 0x72C360:
> llvm::FunctionPassManagerImpl::doFinalization(llvm::Module&)
> (PassManager.cpp:1266)
> ==14590==    by 0x72C28D: llvm::FunctionPassManager::doFinalization()
> (PassManager.cpp:1244)
> ==14590==    by 0x3663: main (llc.cpp:382)
> ==14590==
> ==14590== 72 bytes in 4 blocks are definitely lost in loss record 144 of 173
> ==14590==    at 0x190FAD3: operator new(unsigned long) (vg_replace_malloc.c:220)
> ==14590==    by 0x1B64A69: std::string::_Rep::_S_create(unsigned long,
> unsigned long, std::allocator<char> const&) (in
> /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0x1B65753: char* std::string::_S_construct<char
> const*>(char const*, char const*, std::allocator<char> const&,
> std::forward_iterator_tag) (in /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0x1B65985: std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >::basic_string(char
> const*, unsigned long, std::allocator<char> const&) (in
> /opt/local/lib/gcc44/libstdc++.6.dylib)
> ==14590==    by 0xE6F21: llvm::StringRef::str() const (ADT/StringRef.h:148)
> ==14590==    by 0xE28F2: llvm::StringRef::operator std::string() const
> (ADT/StringRef.h:164)
> ==14590==    by 0x678AD1: llvm::MCSymbol::MCSymbol(llvm::StringRef,
> bool) (MCSymbol.h:60)
> ==14590==    by 0x678888:
> llvm::MCContext::GetOrCreateSymbol(llvm::StringRef) (MCContext.cpp:39)
> ==14590==    by 0x22C07D:
> llvm::X86AsmPrinter::GetGlobalValueSymbol(llvm::GlobalValue const*)
> const (X86AsmPrinter.cpp:59)
> ==14590==    by 0x3FD530:
> llvm::AsmPrinter::SetupMachineFunction(llvm::MachineFunction&)
> (AsmPrinter.cpp:542)
> ==14590==    by 0x22C175:
> llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&)
> (X86AsmPrinter.cpp:79)
> ==14590==    by 0x48EC1A:
> llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
> (MachineFunctionPass.cpp:27)
> ==14590==
> ==14590== 96 bytes in 2 blocks are definitely lost in loss record 146 of 173
> ==14590==    at 0x190F416: malloc (vg_replace_malloc.c:195)
> ==14590==    by 0x7198DB: llvm::MDNode::getMDNode(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int, llvm::MDNode::FunctionLocalness,
> bool) (Metadata.cpp:227)
> ==14590==    by 0x7199A0: llvm::MDNode::get(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int) (Metadata.cpp:237)
> ==14590==    by 0x17177: llvm::LLParser::ParseValID(llvm::ValID&,
> llvm::LLParser::PerFunctionState*) (LLParser.cpp:1985)
> ==14590==    by 0x1B139: llvm::LLParser::ParseValue(llvm::Type const*,
> llvm::Value*&, llvm::LLParser::PerFunctionState&) (LLParser.cpp:2581)
> ==14590==    by 0x13A9A:
> llvm::LLParser::ParseParameterList(llvm::SmallVectorImpl<llvm::LLParser::ParamInfo>&,
> llvm::LLParser::PerFunctionState&) (LLParser.cpp:1434)
> ==14590==    by 0x20B15:
> llvm::LLParser::ParseCall(llvm::Instruction*&,
> llvm::LLParser::PerFunctionState&, bool) (LLParser.cpp:3624)
> ==14590==    by 0x1D8A5:
> llvm::LLParser::ParseInstruction(llvm::Instruction*&,
> llvm::BasicBlock*, llvm::LLParser::PerFunctionState&)
> (LLParser.cpp:3027)
> ==14590==    by 0x1CE12:
> llvm::LLParser::ParseBasicBlock(llvm::LLParser::PerFunctionState&)
> (LLParser.cpp:2892)
> ==14590==    by 0x1CB58:
> llvm::LLParser::ParseFunctionBody(llvm::Function&) (LLParser.cpp:2843)
> ==14590==    by 0xF2F0: llvm::LLParser::ParseDefine() (LLParser.cpp:392)
> ==14590==    by 0xE0F0: llvm::LLParser::ParseTopLevelEntities()
> (LLParser.cpp:161)
> ==14590==
> ==14590== 96 bytes in 2 blocks are definitely lost in loss record 147 of 173
> ==14590==    at 0x190F416: malloc (vg_replace_malloc.c:195)
> ==14590==    by 0x7198DB: llvm::MDNode::getMDNode(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int, llvm::MDNode::FunctionLocalness,
> bool) (Metadata.cpp:227)
> ==14590==    by 0x7199A0: llvm::MDNode::get(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int) (Metadata.cpp:237)
> ==14590==    by 0xF9D9: llvm::LLParser::ParseMDNodeID(llvm::MDNode*&)
> (LLParser.cpp:491)
> ==14590==    by 0x171CD: llvm::LLParser::ParseValID(llvm::ValID&,
> llvm::LLParser::PerFunctionState*) (LLParser.cpp:1993)
> ==14590==    by 0x1B139: llvm::LLParser::ParseValue(llvm::Type const*,
> llvm::Value*&, llvm::LLParser::PerFunctionState&) (LLParser.cpp:2581)
> ==14590==    by 0x13A9A:
> llvm::LLParser::ParseParameterList(llvm::SmallVectorImpl<llvm::LLParser::ParamInfo>&,
> llvm::LLParser::PerFunctionState&) (LLParser.cpp:1434)
> ==14590==    by 0x20B15:
> llvm::LLParser::ParseCall(llvm::Instruction*&,
> llvm::LLParser::PerFunctionState&, bool) (LLParser.cpp:3624)
> ==14590==    by 0x1D8A5:
> llvm::LLParser::ParseInstruction(llvm::Instruction*&,
> llvm::BasicBlock*, llvm::LLParser::PerFunctionState&)
> (LLParser.cpp:3027)
> ==14590==    by 0x1CE12:
> llvm::LLParser::ParseBasicBlock(llvm::LLParser::PerFunctionState&)
> (LLParser.cpp:2892)
> ==14590==    by 0x1CB58:
> llvm::LLParser::ParseFunctionBody(llvm::Function&) (LLParser.cpp:2843)
> ==14590==    by 0xF2F0: llvm::LLParser::ParseDefine() (LLParser.cpp:392)
> ==14590==
> ==14590== 96 bytes in 2 blocks are definitely lost in loss record 148 of 173
> ==14590==    at 0x190F416: malloc (vg_replace_malloc.c:195)
> ==14590==    by 0x7198DB: llvm::MDNode::getMDNode(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int, llvm::MDNode::FunctionLocalness,
> bool) (Metadata.cpp:227)
> ==14590==    by 0x7199A0: llvm::MDNode::get(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int) (Metadata.cpp:237)
> ==14590==    by 0xF9D9: llvm::LLParser::ParseMDNodeID(llvm::MDNode*&)
> (LLParser.cpp:491)
> ==14590==    by 0xFC6F: llvm::LLParser::ParseNamedMetadata() (LLParser.cpp:525)
> ==14590==    by 0xE21C: llvm::LLParser::ParseTopLevelEntities()
> (LLParser.cpp:172)
> ==14590==    by 0xD146: llvm::LLParser::Run() (LLParser.cpp:36)
> ==14590==    by 0x2EDC3: llvm::ParseAssembly(llvm::MemoryBuffer*,
> llvm::Module*, llvm::SMDiagnostic&, llvm::LLVMContext&)
> (Parser.cpp:37)
> ==14590==    by 0x4512: llvm::ParseIR(llvm::MemoryBuffer*,
> llvm::SMDiagnostic&, llvm::LLVMContext&) (IRReader.h:88)
> ==14590==    by 0x468B: llvm::ParseIRFile(std::string const&,
> llvm::SMDiagnostic&, llvm::LLVMContext&) (IRReader.h:105)
> ==14590==    by 0x2AC0: main (llc.cpp:228)
> ==14590==
> ==14590== 288 (144 direct, 144 indirect) bytes in 1 blocks are
> definitely lost in loss record 153 of 173
> ==14590==    at 0x190FAD3: operator new(unsigned long) (vg_replace_malloc.c:220)
> ==14590==    by 0x40C39D:
> llvm::DwarfDebug::getOrCreateAbstractScope(llvm::MDNode*)
> (DwarfDebug.cpp:1326)
> ==14590==    by 0x40C371:
> llvm::DwarfDebug::getOrCreateAbstractScope(llvm::MDNode*)
> (DwarfDebug.cpp:1323)
> ==14590==    by 0x40C268:
> llvm::DwarfDebug::getUpdatedDbgScope(llvm::MDNode*, llvm::MachineInstr
> const*, llvm::MDNode*) (DwarfDebug.cpp:1303)
> ==14590==    by 0x40F828: llvm::DwarfDebug::extractScopeInformation()
> (DwarfDebug.cpp:2102)
> ==14590==    by 0x40FC8F:
> llvm::DwarfDebug::beginFunction(llvm::MachineFunction const*)
> (DwarfDebug.cpp:2160)
> ==14590==    by 0x42D833:
> llvm::DwarfWriter::BeginFunction(llvm::MachineFunction const*)
> (DwarfWriter.cpp:62)
> ==14590==    by 0x3FC5FD: llvm::AsmPrinter::EmitFunctionHeader()
> (AsmPrinter.cpp:317)
> ==14590==    by 0x22C23B:
> llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&)
> (X86AsmPrinter.cpp:90)
> ==14590==    by 0x48EC1A:
> llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
> (MachineFunctionPass.cpp:27)
> ==14590==    by 0x72C7F2:
> llvm::FPPassManager::runOnFunction(llvm::Function&)
> (PassManager.cpp:1350)
> ==14590==    by 0x72C555:
> llvm::FunctionPassManagerImpl::run(llvm::Function&)
> (PassManager.cpp:1301)
> ==14590==
> ==14590== 432 bytes in 9 blocks are definitely lost in loss record 155 of 173
> ==14590==    at 0x190F416: malloc (vg_replace_malloc.c:195)
> ==14590==    by 0x7198DB: llvm::MDNode::getMDNode(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int, llvm::MDNode::FunctionLocalness,
> bool) (Metadata.cpp:227)
> ==14590==    by 0x7199A0: llvm::MDNode::get(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int) (Metadata.cpp:237)
> ==14590==    by 0xF9D9: llvm::LLParser::ParseMDNodeID(llvm::MDNode*&)
> (LLParser.cpp:491)
> ==14590==    by 0x1247A:
> llvm::LLParser::ParseInstructionMetadata(llvm::SmallVectorImpl<std::pair<unsigned
> int, llvm::MDNode*> >&) (LLParser.cpp:1092)
> ==14590==    by 0x1CE9D:
> llvm::LLParser::ParseBasicBlock(llvm::LLParser::PerFunctionState&)
> (LLParser.cpp:2905)
> ==14590==    by 0x1CB58:
> llvm::LLParser::ParseFunctionBody(llvm::Function&) (LLParser.cpp:2843)
> ==14590==    by 0xF2F0: llvm::LLParser::ParseDefine() (LLParser.cpp:392)
> ==14590==    by 0xE0F0: llvm::LLParser::ParseTopLevelEntities()
> (LLParser.cpp:161)
> ==14590==    by 0xD146: llvm::LLParser::Run() (LLParser.cpp:36)
> ==14590==    by 0x2EDC3: llvm::ParseAssembly(llvm::MemoryBuffer*,
> llvm::Module*, llvm::SMDiagnostic&, llvm::LLVMContext&)
> (Parser.cpp:37)
> ==14590==    by 0x4512: llvm::ParseIR(llvm::MemoryBuffer*,
> llvm::SMDiagnostic&, llvm::LLVMContext&) (IRReader.h:88)
> ==14590==
> ==14590== 432 bytes in 9 blocks are definitely lost in loss record 156 of 173
> ==14590==    at 0x190F416: malloc (vg_replace_malloc.c:195)
> ==14590==    by 0x7198DB: llvm::MDNode::getMDNode(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int, llvm::MDNode::FunctionLocalness,
> bool) (Metadata.cpp:227)
> ==14590==    by 0x7199A0: llvm::MDNode::get(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int) (Metadata.cpp:237)
> ==14590==    by 0xF9D9: llvm::LLParser::ParseMDNodeID(llvm::MDNode*&)
> (LLParser.cpp:491)
> ==14590==    by 0x1247A:
> llvm::LLParser::ParseInstructionMetadata(llvm::SmallVectorImpl<std::pair<unsigned
> int, llvm::MDNode*> >&) (LLParser.cpp:1092)
> ==14590==    by 0x1CE7D:
> llvm::LLParser::ParseBasicBlock(llvm::LLParser::PerFunctionState&)
> (LLParser.cpp:2899)
> ==14590==    by 0x1CB58:
> llvm::LLParser::ParseFunctionBody(llvm::Function&) (LLParser.cpp:2843)
> ==14590==    by 0xF2F0: llvm::LLParser::ParseDefine() (LLParser.cpp:392)
> ==14590==    by 0xE0F0: llvm::LLParser::ParseTopLevelEntities()
> (LLParser.cpp:161)
> ==14590==    by 0xD146: llvm::LLParser::Run() (LLParser.cpp:36)
> ==14590==    by 0x2EDC3: llvm::ParseAssembly(llvm::MemoryBuffer*,
> llvm::Module*, llvm::SMDiagnostic&, llvm::LLVMContext&)
> (Parser.cpp:37)
> ==14590==    by 0x4512: llvm::ParseIR(llvm::MemoryBuffer*,
> llvm::SMDiagnostic&, llvm::LLVMContext&) (IRReader.h:88)
> ==14590==
> ==14590== 816 bytes in 17 blocks are definitely lost in loss record 169 of 173
> ==14590==    at 0x190F416: malloc (vg_replace_malloc.c:195)
> ==14590==    by 0x7198DB: llvm::MDNode::getMDNode(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int, llvm::MDNode::FunctionLocalness,
> bool) (Metadata.cpp:227)
> ==14590==    by 0x7199A0: llvm::MDNode::get(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int) (Metadata.cpp:237)
> ==14590==    by 0xF9D9: llvm::LLParser::ParseMDNodeID(llvm::MDNode*&)
> (LLParser.cpp:491)
> ==14590==    by 0x171CD: llvm::LLParser::ParseValID(llvm::ValID&,
> llvm::LLParser::PerFunctionState*) (LLParser.cpp:1993)
> ==14590==    by 0x22765:
> llvm::LLParser::ParseMDNodeVector(llvm::SmallVectorImpl<llvm::Value*>&,
> llvm::LLParser::PerFunctionState*) (LLParser.cpp:3928)
> ==14590==    by 0xFEB9: llvm::LLParser::ParseStandaloneMetadata()
> (LLParser.cpp:546)
> ==14590==    by 0xE1FE: llvm::LLParser::ParseTopLevelEntities()
> (LLParser.cpp:171)
> ==14590==    by 0xD146: llvm::LLParser::Run() (LLParser.cpp:36)
> ==14590==    by 0x2EDC3: llvm::ParseAssembly(llvm::MemoryBuffer*,
> llvm::Module*, llvm::SMDiagnostic&, llvm::LLVMContext&)
> (Parser.cpp:37)
> ==14590==    by 0x4512: llvm::ParseIR(llvm::MemoryBuffer*,
> llvm::SMDiagnostic&, llvm::LLVMContext&) (IRReader.h:88)
> ==14590==    by 0x468B: llvm::ParseIRFile(std::string const&,
> llvm::SMDiagnostic&, llvm::LLVMContext&) (IRReader.h:105)
> ==14590==
> ==14590== 864 (432 direct, 432 indirect) bytes in 3 blocks are
> definitely lost in loss record 170 of 173
> ==14590==    at 0x190FAD3: operator new(unsigned long) (vg_replace_malloc.c:220)
> ==14590==    by 0x40F2CA:
> llvm::DwarfDebug::createDbgScope(llvm::MDNode*, llvm::MDNode*)
> (DwarfDebug.cpp:2038)
> ==14590==    by 0x40F669: llvm::DwarfDebug::extractScopeInformation()
> (DwarfDebug.cpp:2081)
> ==14590==    by 0x40FC8F:
> llvm::DwarfDebug::beginFunction(llvm::MachineFunction const*)
> (DwarfDebug.cpp:2160)
> ==14590==    by 0x42D833:
> llvm::DwarfWriter::BeginFunction(llvm::MachineFunction const*)
> (DwarfWriter.cpp:62)
> ==14590==    by 0x3FC5FD: llvm::AsmPrinter::EmitFunctionHeader()
> (AsmPrinter.cpp:317)
> ==14590==    by 0x22C23B:
> llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&)
> (X86AsmPrinter.cpp:90)
> ==14590==    by 0x48EC1A:
> llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
> (MachineFunctionPass.cpp:27)
> ==14590==    by 0x72C7F2:
> llvm::FPPassManager::runOnFunction(llvm::Function&)
> (PassManager.cpp:1350)
> ==14590==    by 0x72C555:
> llvm::FunctionPassManagerImpl::run(llvm::Function&)
> (PassManager.cpp:1301)
> ==14590==    by 0x72C249:
> llvm::FunctionPassManager::run(llvm::Function&) (PassManager.cpp:1231)
> ==14590==    by 0x3627: main (llc.cpp:379)
> ==14590==
> ==14590== 6,764 (700 direct, 6,064 indirect) bytes in 5 blocks are
> definitely lost in loss record 173 of 173
> ==14590==    at 0x190F416: malloc (vg_replace_malloc.c:195)
> ==14590==    by 0x7198DB: llvm::MDNode::getMDNode(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int, llvm::MDNode::FunctionLocalness,
> bool) (Metadata.cpp:227)
> ==14590==    by 0x7199A0: llvm::MDNode::get(llvm::LLVMContext&,
> llvm::Value* const*, unsigned int) (Metadata.cpp:237)
> ==14590==    by 0xFF2B: llvm::LLParser::ParseStandaloneMetadata()
> (LLParser.cpp:555)
> ==14590==    by 0xE1FE: llvm::LLParser::ParseTopLevelEntities()
> (LLParser.cpp:171)
> ==14590==    by 0xD146: llvm::LLParser::Run() (LLParser.cpp:36)
> ==14590==    by 0x2EDC3: llvm::ParseAssembly(llvm::MemoryBuffer*,
> llvm::Module*, llvm::SMDiagnostic&, llvm::LLVMContext&)
> (Parser.cpp:37)
> ==14590==    by 0x4512: llvm::ParseIR(llvm::MemoryBuffer*,
> llvm::SMDiagnostic&, llvm::LLVMContext&) (IRReader.h:88)
> ==14590==    by 0x468B: llvm::ParseIRFile(std::string const&,
> llvm::SMDiagnostic&, llvm::LLVMContext&) (IRReader.h:105)
> ==14590==    by 0x2AC0: main (llc.cpp:228)
> ==14590==
> ==14590== LEAK SUMMARY:
> ==14590==    definitely lost: 3,466 bytes in 63 blocks
> ==14590==    indirectly lost: 6,640 bytes in 42 blocks
> ==14590==      possibly lost: 22 bytes in 1 blocks
> ==14590==    still reachable: 10,042 bytes in 150 blocks
> ==14590==         suppressed: 380 bytes in 9 blocks
> ==14590== Reachable blocks (those to which a pointer was found) are not shown.
> ==14590== To see them, rerun with: --leak-check=full --show-reachable=yes
> ==14590==
> ==14590== For counts of detected and suppressed errors, rerun with: -v
> ==14590== ERROR SUMMARY: 15 errors from 15 contexts (suppressed: 0 from 0)
> <delete_compile_units.patch>





More information about the llvm-commits mailing list