summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix memory leak in liveintervals: the destructor for VNInfos must be called,Torok Edwin2010-03-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) llvm-svn: 99400
* dbg_value may end a block.Evan Cheng2010-03-241-4/+4
| | | | llvm-svn: 99378
* Remove the ConvertActions table and associated code, which is unused.Dan Gohman2010-03-241-1/+0
| | | | llvm-svn: 99372
* Revert 99335. getTypeToExpandTo's iterative behavior is actuallyDan Gohman2010-03-231-3/+2
| | | | | | needed here. llvm-svn: 99339
* Remove getTypeToExpandTo, since it isn't adding much valueDan Gohman2010-03-231-2/+3
| | | | | | beyond just calling getTypeToTransformTo. llvm-svn: 99335
* Ignore dbg_value's.Evan Cheng2010-03-231-5/+7
| | | | llvm-svn: 99321
* Code clean up.Evan Cheng2010-03-231-6/+6
| | | | llvm-svn: 99319
* Fix PR6673: updating the callback should not clear the map.Chris Lattner2010-03-221-1/+5
| | | | llvm-svn: 99227
* Emit DW_AT_low_pc and DW_AT_high_pc attributes for TAG_compile_unit.Devang Patel2010-03-221-4/+8
| | | | llvm-svn: 99225
* DW_AT_stmt_list attribute attached with a compile unit encodes offset of ↵Devang Patel2010-03-224-77/+4
| | | | | | line number information for this compile unit in debug_line section. This offset is always zero when only one compile unit is emitted in a object file. llvm-svn: 99223
* Reduce indentation.Evan Cheng2010-03-221-35/+34
| | | | llvm-svn: 99214
* Fix a memory leak from DIE::addSiblingOffset() by adding the DIEValueJeffrey Yasskin2010-03-223-5/+9
| | | | | | it allocates to DwarfDebug::DIEValues. llvm-svn: 99196
* 80 col violation.Evan Cheng2010-03-221-1/+2
| | | | llvm-svn: 99195
* Free SavedLI even if SimpleRegisterCoalescing::JoinCopy() returns early.Jeffrey Yasskin2010-03-211-4/+5
| | | | llvm-svn: 99113
* Stop trying to merge identical jump tables. This had been inadvertentlyBob Wilson2010-03-192-39/+6
| | | | | | | | | | | disabled for several months (since svn r88806) and no one noticed. My fix for pr6543 yesterday reenabled it, but broke the ARM port's code for using TBB/TBH. Rather than adding a target hook to disable merging for Thumb2 only, I'm just taking this out. It is not common to have identical jump tables, the code we used to merge them was O(N^2), and it only helps code size, not performance. llvm-svn: 98977
* Fixed a widening bug where we were not using the correct size for the loadMon P Wang2010-03-191-1/+1
| | | | llvm-svn: 98920
* Get rid of target-specific nodes for fp16 <-> fp32 conversion.Anton Korobeynikov2010-03-181-2/+0
| | | | llvm-svn: 98888
* Define placement new wrappers for BumpPtrAllocator andDan Gohman2010-03-182-101/+69
| | | | | | | RecyclingAllocator to allow client code to be simpler, and simplify several clients. llvm-svn: 98847
* Fix pr6543: svn r88806 changed MachineJumpTableInfo::getJumpTableIndex() toBob Wilson2010-03-182-6/+14
| | | | | | | | | | | | | | | | | always create a new jump table. The intention was to avoid merging jump tables in SelectionDAGBuilder, and to wait for the branch folding pass to merge tables. Unfortunately, the same getJumpTableIndex() method is also used to merge tables in branch folding, so as a result of this change branch tables are never merged. Worse, the branch folding code is expecting getJumpTableIndex to always return the index of an existing table, but with this change, it never does so. In at least some cases, e.g., pr6543, this creates references to non-existent tables. I've fixed the problem by adding a new createJumpTableIndex function, which will always create a new table, and I've changed getJumpTableIndex to only look at existing tables. llvm-svn: 98845
* Add explicit braces to avoid ambiguous ‘else’.Dan Gohman2010-03-181-1/+2
| | | | llvm-svn: 98838
* Fix comment.Devang Patel2010-03-181-1/+1
| | | | llvm-svn: 98830
* Revert "Change coalescer complexity from N^2 to N logN by changing one letter."Jakob Stoklund Olesen2010-03-181-1/+12
| | | | | | This reverts commit 98776. It broke the llvm-gcc boot strap. llvm-svn: 98784
* Debug info intrinsic does not intefer during tail call optimization.Devang Patel2010-03-171-0/+3
| | | | llvm-svn: 98778
* Change coalescer complexity from N^2 to N logN by changing one letter.Jakob Stoklund Olesen2010-03-171-12/+1
| | | | | | | | | Remove ugly hack that aborted the coalescer before using N^2 time. This affects functions with very complicated live intervals for physical registers, i.e. functions with thousands of function calls. llvm-svn: 98776
* Fix EmitSectionOffset incorrect argument. DwarfDebug is emitting debug info ↵Devang Patel2010-03-171-9/+8
| | | | | | so isEH is always false. This was hiding until now from compilers because of default arguments. This was hiding from dwarf debug info users because for most of the platform isAbsoluteEHSectionOffsets() is same as isAbsoluteDebugSectionOffsets(). But Chris found it while updating dwarf printer to use MC*. llvm-svn: 98743
* fix GetOrCreateTemporarySymbol to require a name, clientsChris Lattner2010-03-171-1/+1
| | | | | | | should use CreateTempSymbol() if they don't care about the name. llvm-svn: 98712
* Remove a check that can no longer be true, after r84803.Bob Wilson2010-03-161-16/+0
| | | | llvm-svn: 98694
* Fix liveintervals handling of dbg_value instructions.Evan Cheng2010-03-161-9/+15
| | | | llvm-svn: 98686
* reapply r98656 unmodified, which exposed the asmprinter not Chris Lattner2010-03-162-3/+26
| | | | | | handling constant unions. llvm-svn: 98680
* Ignore debug value instructions while analyzing BB for tail duplication.Devang Patel2010-03-161-1/+1
| | | | llvm-svn: 98675
* Revert r98656, its breaking all over the place.Daniel Dunbar2010-03-162-26/+3
| | | | llvm-svn: 98662
* improve support for uniontype and ConstantUnion, patch by Tim Northover!Chris Lattner2010-03-162-3/+26
| | | | llvm-svn: 98656
* Use getFirstTerminator().Bill Wendling2010-03-161-4/+4
| | | | llvm-svn: 98604
* When checking if something's killed, don't rely simply on whether it's marked asBill Wendling2010-03-161-8/+15
| | | | | | | "used outside of the block". If the block ends in a return, then it won't be used outside of it. llvm-svn: 98599
* Fix the third (and last known) case of code update problems due Chris Lattner2010-03-162-28/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | to LLVM IR changes with addr label weirdness. In the testcase, we generate references to the two bb's when codegen'ing the first function: _test1: ## @test1 leaq Ltmp0(%rip), %rax .. leaq Ltmp1(%rip), %rax Then continue to codegen the second function where the blocks get merged. We're now smart enough to emit both labels, producing this code: _test_fun: ## @test_fun ## BB#0: ## %entry Ltmp1: ## Block address taken Ltmp0: ## BB#1: ## %ret movl $-1, %eax ret Rejoice. llvm-svn: 98595
* Now that the default for Darwin platforms is to place the LSDA into the TEXTBill Wendling2010-03-151-3/+3
| | | | | | section, remove the target-specific code that performs this. llvm-svn: 98580
* Implement support for the case when a reference to a addr-of-bb Chris Lattner2010-03-152-6/+69
| | | | | | | | | label is generated, but then the block is deleted. Since the value is undefined, we just emit the label right after the entry label of the function. It might matter that the label is in the same section as the function was afterall. llvm-svn: 98579
* use Mang->getSymbol() more.Chris Lattner2010-03-151-35/+17
| | | | llvm-svn: 98577
* Create SDDbgValue for dbg_value intrinsics and remember its connections with ↵Devang Patel2010-03-151-5/+28
| | | | | | | | DAG nodes. This is a work in progress. Patch by Dale Johannesen! llvm-svn: 98568
* Fix the case when a reference to an address taken BB is emitted in oneChris Lattner2010-03-151-6/+110
| | | | | | | | function, then the BB is RAUW'd before the definition is emitted. There are still two cases not being handled, but this should improve us back to the situation before I touched anything. llvm-svn: 98566
* revert r98550, it isn't necessary or sufficient.Chris Lattner2010-03-151-15/+3
| | | | llvm-svn: 98558
* Emit dwarf variable info communicated by code generator through DBG_VALUE ↵Devang Patel2010-03-154-14/+107
| | | | | | | | machine instructions. This is a work in progress. llvm-svn: 98556
* don't eliminate address-taken blocks here.Chris Lattner2010-03-151-3/+15
| | | | llvm-svn: 98550
* SIGN_EXTEND from the same type as the dest is valid.Chris Lattner2010-03-151-1/+1
| | | | llvm-svn: 98548
* sink the call to VT.getSizeInBits() down into its uses,Chris Lattner2010-03-151-7/+5
| | | | | | not all unary nodes necessarily have a simple result type. llvm-svn: 98547
* fix MCSectionELF to not leak memory, just like I did for MCSymbol.Chris Lattner2010-03-151-4/+6
| | | | | | | MCSectionMachO is already fine (yay for fixed size arrays?), MCSectionCOFF still leaks. llvm-svn: 98537
* remove dead method.Chris Lattner2010-03-151-7/+0
| | | | llvm-svn: 98526
* Remove pointless forward declaration, MSVC got confused by this.Benjamin Kramer2010-03-141-1/+0
| | | | llvm-svn: 98519
* Turn calls to copysignl into an FCOPYSIGN node. Handle FCOPYSIGN nodesDuncan Sands2010-03-144-1/+18
| | | | | | | with ppc_f128 type by having the type legalizer turn these back into a call to copysignl. llvm-svn: 98514
* Rename SDDbgValue.h to SDNodeDbgValue.h for consistency.Evan Cheng2010-03-144-6/+6
| | | | llvm-svn: 98513
OpenPOWER on IntegriCloud