summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch llvm to using comdats. For now always use groups with a singleRafael Espindola2011-02-141-23/+9
| | | | | | section. llvm-svn: 125526
* Fix PR8854. Track inserted copies to avoid read before write. Sorry, it's ↵Evan Cheng2011-02-141-4/+16
| | | | | | hard to reduce a sensible small test case. llvm-svn: 125523
* revert my ConstantVector patch, it seems to have made the llvm-gccChris Lattner2011-02-141-6/+22
| | | | | | builders unhappy. llvm-svn: 125504
* Move broken HasCommonSymbols to ELFWriter.cpp.Rafael Espindola2011-02-141-1/+13
| | | | llvm-svn: 125490
* Switch ConstantVector::get to use ArrayRef instead of a pointer+sizeChris Lattner2011-02-141-22/+6
| | | | | | idiom. Change various clients to simplify their code. llvm-svn: 125487
* fix PR9210 by implementing some type legalization logic for Chris Lattner2011-02-142-14/+47
| | | | | | vector fp conversions. llvm-svn: 125482
* fix two comment thinkosChris Lattner2011-02-141-1/+1
| | | | llvm-svn: 125481
* Add some statistics to StrongPHIElimination.Cameron Zwarich2011-02-141-0/+8
| | | | llvm-svn: 125477
* Add a statistic to PHIElimination tracking the number of critical edges split.Cameron Zwarich2011-02-141-2/+7
| | | | llvm-svn: 125476
* Enhance ComputeMaskedBits to know that aligned frameindexesChris Lattner2011-02-132-9/+37
| | | | | | | | | | | | | | | | | have their low bits set to zero. This allows us to optimize out explicit stack alignment code like in stack-align.ll:test4 when it is redundant. Doing this causes the code generator to start turning FI+cst into FI|cst all over the place, which is general goodness (that is the canonical form) except that various pieces of the code generator don't handle OR aggressively. Fix this by introducing a new SelectionDAG::isBaseWithConstantOffset predicate, and using it in places that are looking for ADD(X,CST). The ARM backend in particular was missing a lot of addressing mode folding opportunities around OR. llvm-svn: 125470
* Revisit my fix for PR9028: the issue is that DAGCombine was Chris Lattner2011-02-134-40/+46
| | | | | | | | | generating i8 shift amounts for things like i1024 types. Add an assert in getNode to prevent this from occuring in the future, fix the buggy transformation, revert my previous patch, and document this gotcha in ISDOpcodes.h llvm-svn: 125465
* when legalizing extremely wide shifts, make sure that Chris Lattner2011-02-132-3/+9
| | | | | | | | | the shift amounts are in a suitably wide type so that we don't generate out of range constant shift amounts. This fixes PR9028. llvm-svn: 125458
* fix visitShift to properly zero extend the shift amount if the provided operandChris Lattner2011-02-131-20/+19
| | | | | | | is narrower than the shift register. Doing an anyext provides undefined bits in the top part of the register. llvm-svn: 125457
* A fix for 9165.Nadav Rotem2011-02-121-4/+9
| | | | | | | | The DAGCombiner created illegal BUILD_VECTOR operations. The patch added a check that either illegal operations are allowed or that the created operation is legal. llvm-svn: 125435
* SimplifySelectOps can only handle selects with a scalar condition. Add a checkNadav Rotem2011-02-111-0/+3
| | | | | | that the condition is not a vector. llvm-svn: 125398
* Fix #9190Nadav Rotem2011-02-111-1/+1
| | | | | | | | | | | The bug happens when the DAGCombiner attempts to optimize one of the patterns of the SUB opcode. It tries to create a zero of type v2i64. This type is legal on 32bit machines, but the initializer of this vector (i64) is target dependent. Currently, the initializer attempts to create an i64 zero constant, which fails. Added a flag to tell the DAGCombiner to create a legal zero, if we require that the pass would generate legal types. llvm-svn: 125391
* After 3-addressifying a two-address instruction, update the register maps; ↵Evan Cheng2011-02-101-4/+9
| | | | | | add a missing check when considering whether it's profitable to commute. rdar://8977508. llvm-svn: 125259
* Delete unused code for analyzing and splitting around loops.Jakob Stoklund Olesen2011-02-092-389/+2
| | | | | | | Loop splitting is better handled by the more generic global region splitting based on the edge bundle graph. llvm-svn: 125243
* Simplify using the new leaveIntvBefore()Jakob Stoklund Olesen2011-02-091-13/+2
| | | | llvm-svn: 125238
* Use the LiveBLocks array for SplitEditor::splitSingleBlocks() as well.Jakob Stoklund Olesen2011-02-092-44/+47
| | | | | | | This fixes a bug where splitSingleBlocks() could split a live range after a terminator instruction. llvm-svn: 125237
* Typo.Mikhail Glushenkov2011-02-091-1/+1
| | | | llvm-svn: 125232
* Move calcLiveBlockInfo() and the BlockInfo struct into SplitAnalysis.Jakob Stoklund Olesen2011-02-094-144/+142
| | | | | | No functional changes intended. llvm-svn: 125231
* Ignore <undef> uses when analyzing and rewriting.Jakob Stoklund Olesen2011-02-091-2/+14
| | | | llvm-svn: 125226
* Assert on bad jump tables.Jakob Stoklund Olesen2011-02-091-0/+1
| | | | llvm-svn: 125225
* Add tags to live interval unions to avoid using stale queries.Jakob Stoklund Olesen2011-02-092-2/+15
| | | | | | | The tag is updated whenever the live interval union is changed, and it is tested before using cached information. llvm-svn: 125224
* Evict a lighter single interference before attempting to split a live range.Jakob Stoklund Olesen2011-02-093-36/+64
| | | | | | | | | | | | | | Registers are not allocated strictly in spill weight order when live range splitting and spilling has created new shorter intervals with higher spill weights. When one of the new heavy intervals conflicts with a single lighter interval, simply evict the old interval instead of trying to split the heavy one. The lighter interval is a better candidate for splitting, it has a smaller use density. llvm-svn: 125151
* Set an allocation hint when rematting before a COPY.Jakob Stoklund Olesen2011-02-091-0/+4
| | | | | | This almost guarantees that the COPY will be coalesced. llvm-svn: 125140
* Fix one more case of splitting after the last split point.Jakob Stoklund Olesen2011-02-081-8/+10
| | | | llvm-svn: 125137
* Reorganize interference code to check LastSplitPoint first.Jakob Stoklund Olesen2011-02-081-29/+43
| | | | | | | The last split point can be anywhere in the block, so it interferes with the strictly monotonic requirements of advanceTo(). llvm-svn: 125132
* Also handle the situation where an indirect branch is the first (and last)Jakob Stoklund Olesen2011-02-081-6/+8
| | | | | | instruction in a basic block. llvm-svn: 125116
* Add LiveIntervals::addKillFlags() to recompute kill flags after register ↵Jakob Stoklund Olesen2011-02-082-0/+24
| | | | | | | | | allocation. This is a lot easier than trying to get kill flags right during live range splitting and rematerialization. llvm-svn: 125113
* Trim debug spewJakob Stoklund Olesen2011-02-081-1/+0
| | | | llvm-svn: 125109
* Avoid folding a load instruction into an instruction that redefines the ↵Jakob Stoklund Olesen2011-02-081-1/+5
| | | | | | | | register. The target hook doesn't know how to do that. (Neither do I). llvm-svn: 125108
* Add SplitEditor::overlapIntv() to create small ranges where both registers ↵Jakob Stoklund Olesen2011-02-083-2/+53
| | | | | | | | | | | | | | | | | | | | | | are live. If a live range is used by a terminator instruction, and that live range needs to leave the block on the stack or in a different register, it can be necessary to have both sides of the split live at the terminator instruction. Example: %vreg2 = COPY %vreg1 JMP %vreg1 Becomes after spilling %vreg2: SPILL %vreg1 JMP %vreg1 The spill doesn't kill the register as is normally the case. llvm-svn: 125102
* Add assertion.Jakob Stoklund Olesen2011-02-081-3/+4
| | | | llvm-svn: 125101
* Fix PostRA antidependence breaker.Andrew Trick2011-02-082-11/+49
| | | | | | | | Avoid using the same register for two def operands or and earlyclobber def and use operand. This fixes PR8986 and improves on the prior fix for rdar://problem/8959122. llvm-svn: 125089
* Add LiveIntervals::shrinkToUses().Jakob Stoklund Olesen2011-02-083-23/+135
| | | | | | | | After uses of a live range are removed, recompute the live range to only cover the remaining uses. This is necessary after rematerializing the value before some (but not all) uses. llvm-svn: 125058
* Remove comment about an argument that was removed couple of years ago.Devang Patel2011-02-071-1/+0
| | | | llvm-svn: 125054
* Fix an anti-dep breaker corner case.Andrew Trick2011-02-051-1/+0
| | | | | | | | | | | | | <rdar://problem/8959122> illegal register operands for UMULL instruction in cfrac nightly test I'm stil working on a unit test, but the case is: rx = movcc rx, r3 r2 = ldr r2, r3 = umull r2, r2 The anti-dep breaker should not convert this into an illegal instruction: r2, r2 = umull llvm-svn: 124932
* Be more strict about the first/last interference-free use.Jakob Stoklund Olesen2011-02-051-4/+25
| | | | | | If the interference overlaps the instruction, we cannot separate it. llvm-svn: 124918
* Add assertions to verify that the new interval is clear of the interference.Jakob Stoklund Olesen2011-02-051-7/+14
| | | | | | | If these inequalities don't hold, we are creating a live range split that won't allocate. llvm-svn: 124917
* Apparently, it is possible for a block with a landing pad successor to have ↵Jakob Stoklund Olesen2011-02-041-1/+1
| | | | | | | | | no calls. In that case we simply ignore the landing pad and split live ranges before the first terminator. llvm-svn: 124907
* Merge .debug_loc entries whenever possible to reduce debug_loc size.Devang Patel2011-02-042-15/+32
| | | | llvm-svn: 124904
* Mark that the return is using EAX so that we don't use it for some otherNick Lewycky2011-02-041-0/+21
| | | | | | purpose. Fixes PR9080! llvm-svn: 124903
* Be more accurate about live range splitting at the end of blocks.Jakob Stoklund Olesen2011-02-041-4/+17
| | | | | | | | | | | If interference reaches the last split point, it is effectively live out and should be marked as 'MustSpill'. This can make a difference when the terminator uses a register. There is no way that register can be reused in the outgoing CFG bundle, even if it isn't live out. llvm-svn: 124900
* Add LiveIntervals::getLastSplitPoint().Jakob Stoklund Olesen2011-02-043-1/+33
| | | | | | | | A live range cannot be split everywhere in a basic block. A split must go before the first terminator, and if the variable is live into a landing pad, the split must happen before the call that can throw. llvm-svn: 124894
* Verify that one of the ranges produced by region splitting is allocatable.Jakob Stoklund Olesen2011-02-041-1/+15
| | | | | | | We should not be attempting a region split if it won't lead to at least one directly allocatable interval. That could cause infinite splitting loops. llvm-svn: 124893
* Introducing a new method of tracking register pressure. We can'tAndrew Trick2011-02-044-116/+169
| | | | | | | | | | | | | | | precisely track pressure on a selection DAG, but we can at least keep it balanced. This design accounts for various interesting aspects of selection DAGS: register and subregister copies, glued nodes, dead nodes, unused registers, etc. Added SUnit::NumRegDefsLeft and ScheduleDAGSDNodes::RegDefIter. Note: I disabled PrescheduleNodesWithMultipleUses when register pressure is enabled, based on no evidence other than I don't think it makes sense to have both enabled. llvm-svn: 124853
* DebugLoc associated with a machine instruction is used to emit location ↵Devang Patel2011-02-041-20/+29
| | | | | | entries. DebugLoc associated with a DBG_VALUE is used to identify lexical scope of the variable. After register allocation, while inserting DBG_VALUE remember original debug location for the first instruction and reuse it, otherwise dwarf writer may be mislead in identifying the variable's scope. llvm-svn: 124845
* Update comments.Evan Cheng2011-02-041-2/+3
| | | | llvm-svn: 124843
OpenPOWER on IntegriCloud