summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Add SplitKit::isOriginalEndpoint and use it to force live range splitting to ↵Jakob Stoklund Olesen2011-02-213-2/+32
| | | | | | | | | | | | | | terminate. An original endpoint is an instruction that killed or defined the original live range before any live ranges were split. When splitting global live ranges, avoid creating local live ranges without any original endpoints. We may still create global live ranges without original endpoints, but such a range won't be split again, and live range splitting still terminates. llvm-svn: 126151
* Fix to correctly support attribute((section("__DATA, __common"))).Stuart Hastings2011-02-211-1/+10
| | | | | | Radar 9012638. llvm-svn: 126127
* Fix 9267; Add vector zext support.Nadav Rotem2011-02-201-1/+3
| | | | | | | | The DAGCombiner folds the zext into complex load instructions. This patch prevents this optimization on vectors since none of the supported targets knows how to perform load+vector_zext in one instruction. llvm-svn: 126080
* Do not emit empty DW_TAG_lexical_block DIEs. In one test case, size of ↵Devang Patel2011-02-191-17/+20
| | | | | | debug info reduced by almost 7%. llvm-svn: 126009
* Give SplitAnalysis a VRM member to access VirtRegMap::getOriginal().Jakob Stoklund Olesen2011-02-193-5/+7
| | | | llvm-svn: 126005
* Missed member rename for naming convention.Jakob Stoklund Olesen2011-02-192-9/+9
| | | | llvm-svn: 126003
* This method belonged in VirtRegMap.Jakob Stoklund Olesen2011-02-193-10/+10
| | | | llvm-svn: 126002
* Separate timers for local and global splitting.Jakob Stoklund Olesen2011-02-191-2/+5
| | | | llvm-svn: 126001
* Do not lose debug info of an inlined function argument even if the argument ↵Devang Patel2011-02-184-14/+15
| | | | | | | | is only used through GEPs. This time with a fix that avoids using invalidated DenseMap iterator. llvm-svn: 125984
* Use VirtRegMap's Virt2SplitMap to keep track of the original live range ↵Jakob Stoklund Olesen2011-02-183-2/+12
| | | | | | | | before splitting. All new virtual registers created for spilling or splitting point back to their original. llvm-svn: 125980
* Move library stuff out of the toplevel CMakeLists.txt file.Oscar Fuentes2011-02-181-0/+3
| | | | llvm-svn: 125968
* Add VirtRegMap::rewrite() and use it in the new register allocators.Jakob Stoklund Olesen2011-02-184-6/+81
| | | | | | | | | | The rewriter works almost identically to -rewriter=trivial, except it also eliminates any identity copies. This makes the new register allocators independent of VirtRegRewriter.cpp which will be going away at the same time as RegAllocLinearScan. llvm-svn: 125967
* Reapply r114997 now that the buildbots have been updated.Bill Wendling2011-02-181-8/+4
| | | | llvm-svn: 125960
* Roll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.Cameron Zwarich2011-02-184-10/+13
| | | | llvm-svn: 125830
* Trim debugging output.Jakob Stoklund Olesen2011-02-182-29/+6
| | | | llvm-svn: 125802
* Do not lose debug info of an inlined function argument even if the argument ↵Devang Patel2011-02-174-13/+10
| | | | | | is only used through GEPs. llvm-svn: 125794
* Add basic register allocator statistics.Jakob Stoklund Olesen2011-02-172-0/+18
| | | | llvm-svn: 125789
* Split local live ranges.Jakob Stoklund Olesen2011-02-172-2/+280
| | | | | | | | A local live range is live in a single basic block. If such a range fails to allocate, try to find a sub-range that would get a larger spill weight than its interference. llvm-svn: 125764
* Fix wrong logic in promotion of signed mul-with-overflow (I pointed this out atDuncan Sands2011-02-171-18/+12
| | | | | | | | | the time but presumably my email got lost). Examples where the previous logic got it wrong: (1) a signed i8 multiply of 64 by 2 overflows, but the high part is zero; (2) a signed i8 multiple of -128 by 2 overflows, but the high part is all ones. llvm-svn: 125748
* Switch to SmallVector in SimpleRegisterCoalescing for a 3.5% speedup on 403.gcc.Cameron Zwarich2011-02-171-3/+3
| | | | llvm-svn: 125728
* Adjust indenting of arguments.Cameron Zwarich2011-02-171-3/+3
| | | | llvm-svn: 125727
* Return Changed from SplitPHIEdges rather than always returning true.Cameron Zwarich2011-02-171-1/+1
| | | | llvm-svn: 125726
* Swap VT and DebugLoc operands of getExtLoad() for consistency withStuart Hastings2011-02-166-53/+52
| | | | | | other getNode() methods. Radar 9002173. llvm-svn: 125665
* Refactor zero folding slightly. Clean up todo.Eric Christopher2011-02-161-22/+20
| | | | llvm-svn: 125651
* The change for PR9190 wasn't quite right. We need to avoid making theEric Christopher2011-02-161-2/+12
| | | | | | | | | transformation if we can't legally create a build vector of the correct type. Check that we can make the transformation first, and add a TODO to refactor this code with similar cases. Fixes: PR9223 and rdar://9000350 llvm-svn: 125631
* Remove a duplicated check.Evan Cheng2011-02-161-1/+1
| | | | llvm-svn: 125625
* Ignore DBG_VALUE machine instructions while constructing instruction ranges ↵Devang Patel2011-02-151-0/+4
| | | | | | | | based on location info. Machine instruction range consisting of only DBG_VALUE MIs only contributes consecutive labels in assembly output, which is harmless, and empty scope entry in DebugInfo, which confuses debugger tools. llvm-svn: 125577
* Spelling fix: consequtive -> consecutive.Duncan Sands2011-02-151-1/+1
| | | | llvm-svn: 125563
* Fix thinko. Cmp can be the first instruction in a MBB.Evan Cheng2011-02-151-2/+5
| | | | llvm-svn: 125552
* convert ConstantVector::get to use ArrayRef.Chris Lattner2011-02-151-22/+6
| | | | llvm-svn: 125537
* Move more fragments of spill weight calculation into CalcSpillWeights.hJakob Stoklund Olesen2011-02-142-5/+5
| | | | | | | | | | Simplify the spill weight calculation a bit by bypassing getApproximateInstructionCount() and using LiveInterval::getSize() directly. This changes the computed spill weights, but only by a constant factor in each function. It should not affect how spill weights compare against each other, and so it shouldn't affect code generation. llvm-svn: 125530
* 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
OpenPOWER on IntegriCloud