llvm-6502/test/CodeGen
Torok Edwin 15417383b9 Fix memory leak in liveintervals: the destructor for VNInfos must be called,
otherwise the SmallVector it contains doesn't free its memory.
In most cases LiveIntervalAnalysis could get away by not calling the destructor,
because VNInfos are bumpptr-allocated, and smallvectors usually don't grow.
However when the SmallVector does grow it always leaks.

This is the valgrind shown leak from the original testcase:
==8206== 18,304 bytes in 151 blocks are definitely lost in loss record 164 of 164
==8206==    at 0x4A079C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==8206==    by 0x4DB7A7E: llvm::SmallVectorBase::grow_pod(unsigned long, unsigned long) (in /home/edwin/clam/git/builds/defaul
t/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4F90382: llvm::VNInfo::addKill(llvm::SlotIndex) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libcl
amav.so.6.1.0)
==8206==    by 0x5126B5C: llvm::LiveIntervals::handleVirtualRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::M
achineInstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int, llvm::LiveInterval&) (in /home/edwin/clam/git/builds/defau
lt/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x512725E: llvm::LiveIntervals::handleRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::MachineI
nstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav
.so.6.1.0)
==8206==    by 0x51278A8: llvm::LiveIntervals::computeIntervals() (in /home/edwin/clam/git/builds/default/libclamav/.libs/libc
lamav.so.6.1.0)
==8206==    by 0x5127CB4: llvm::LiveIntervals::runOnMachineFunction(llvm::MachineFunction&) (in /home/edwin/clam/git/builds/de
fault/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAE935: llvm::FPPassManager::runOnFunction(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
v/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAEB10: llvm::FunctionPassManagerImpl::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
v/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAED3D: llvm::FunctionPassManager::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclamav/.l
ibs/libclamav.so.6.1.0)
==8206==    by 0x4D8BE8E: llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard const&) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4D8CA72: llvm::JIT::getPointerToFunction(llvm::Function*) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99400 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 13:50:36 +00:00
..
Alpha Fix PR2590 by making PatternSortingPredicate actually be 2010-03-01 22:09:11 +00:00
ARM pr6652: Use LDM to restore PC to the return address on ARMv4. 2010-03-20 22:20:40 +00:00
Blackfin Change the scheduler from adding nodes in allnodes order 2010-02-24 06:11:37 +00:00
CBackend
CellSPU fix bss section printing for cell, patch by Kalle Raiskila! 2010-03-05 18:55:36 +00:00
CPP
Generic Fix memory leak in liveintervals: the destructor for VNInfos must be called, 2010-03-24 13:50:36 +00:00
MBlaze Re-committing the failed r97807 commit with changes to eliminate warnings. 2010-03-06 23:23:12 +00:00
Mips
MSP430 Do not use '&' prefix for globals when register base field is non-zero, otherwise msp430-as will silently miscompile the code (TI's assembler report an error though). 2010-03-06 11:41:12 +00:00
PIC16 this testcase is failing because pic16 doesn't define a reg/reg 2010-03-02 20:48:24 +00:00
PowerPC Turn calls to copysignl into an FCOPYSIGN node. Handle FCOPYSIGN nodes 2010-03-14 21:08:40 +00:00
SPARC
SystemZ
Thumb Enable machine cse pass. 2010-03-10 03:07:41 +00:00
Thumb2 Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm 2010-03-17 17:52:21 +00:00
X86 Stupid svn. Add back to the lost sibcall tests. 2010-03-20 03:17:05 +00:00
XCore fix AsmPrinter::GetBlockAddressSymbol to always return a unique 2010-03-14 17:53:23 +00:00