summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor the LiveOutInfo interface into a few methods on FunctionLoweringInfoCameron Zwarich2011-02-242-17/+9
| | | | | | and make the actual map private. llvm-svn: 126376
* Have isel visit blocks in reverse postorder rather than an undefined order. ThisCameron Zwarich2011-02-241-2/+5
| | | | | | allows for the information propagated across basic blocks to be merged at phis. llvm-svn: 126375
* Use the same spill slot for all live ranges that descend form the same originalJakob Stoklund Olesen2011-02-241-4/+13
| | | | | | | | | register. This avoids some silly stack slot shuffling when both sides of a copy get spilled. llvm-svn: 126353
* Use DW_FORM_data2 for DW_AT_language and let users use ↵Devang Patel2011-02-231-1/+1
| | | | | | DW_LANG_lo_user=0x8000 to DW_LANG_hi_user=0xffff range. llvm-svn: 126339
* It is safe to ignore LastSplitPoint when the variable is not live out.Jakob Stoklund Olesen2011-02-231-2/+2
| | | | | | No code will be inserted after the split point anyway. llvm-svn: 126319
* Omit private_extern declarations of extern symbols; followup toStuart Hastings2011-02-231-3/+7
| | | | | | r124468. Patch by Rafael Avila de Espindola! llvm-svn: 126297
* Keep track of how many times a live range has been dequeued, and prioritize ↵Jakob Stoklund Olesen2011-02-231-0/+7
| | | | | | | | | | | new ranges. When a large live range is evicted, it will usually be split when it comes around again. By deferring evicted live ranges, the splitting happens at a time when the interference pattern is more realistic. This prevents repeated splitting and evictions. llvm-svn: 126282
* Fix a bug in determining if there is only a single interfering register.Jakob Stoklund Olesen2011-02-231-2/+1
| | | | llvm-svn: 126277
* Be more aggressive about evicting interference.Jakob Stoklund Olesen2011-02-231-26/+88
| | | | | | | | | | | | | Use interval sizes instead of spill weights to determine if it is legal to evict interference. A smaller interval can evict interference if all interfering live ranges are larger. Allow multiple interferences to be evicted as along as they are all larger than the live range being allocated. Spill weights are still used to select the preferred eviction candidate. llvm-svn: 126276
* Change the RAGreedy register assignment order so large live ranges are ↵Jakob Stoklund Olesen2011-02-223-47/+69
| | | | | | | | | | | | | | allocated first. This is based on the observation that long live ranges are more difficult to allocate, so there is a better chance of solving the puzzle by handling the big pieces first. The allocator will evict and split long alive ranges when they get in the way. RABasic is still using spill weights for its priority queue, so the interface to the queue has been virtualized. llvm-svn: 126259
* 80 Col.Jakob Stoklund Olesen2011-02-221-2/+1
| | | | llvm-svn: 126258
* MachineConstantPoolValues are not uniqued, so they need to be freed if theyCameron Zwarich2011-02-221-1/+7
| | | | | | | | | share entries. Add a DenseSet to MachineConstantPool for the MachineCPVs that it owns. This will hopefully fix the MC/ARM/elf-reloc-01.ll failure on the leaks bots. llvm-svn: 126218
* VirtRegRewriter assertion fix.Andrew Trick2011-02-221-2/+4
| | | | | | | Apparently it's ok for multiple operands to "kill" the same register. Fixes PR9237. llvm-svn: 126190
* Roll out r126169 and r126170 in an attempt to fix the selfhost bot.Cameron Zwarich2011-02-223-59/+9
| | | | llvm-svn: 126185
* Merge information about the number of zero, one, and sign bits of live-out ↵Cameron Zwarich2011-02-223-7/+54
| | | | | | | | | registers at phis. This enables us to eliminate a lot of pointless zexts during the DAGCombine phase. This fixes <rdar://problem/8760114>. llvm-svn: 126170
* Have isel visit blocks in reverse postorder rather than an undefined order. ThisCameron Zwarich2011-02-221-2/+5
| | | | | | allows for the information propagated across basic blocks to be merged at phis. llvm-svn: 126169
* Revert r125960, it's breaking darwin10 bootstrap.Eric Christopher2011-02-211-4/+8
| | | | llvm-svn: 126163
* Add more debugging output.Evan Cheng2011-02-211-2/+4
| | | | llvm-svn: 126158
* Revert r124611 - "Keep track of incoming argument's location while emitting ↵Devang Patel2011-02-214-22/+4
| | | | | | | | | | | LiveIns." In other words, do not keep track of argument's location. The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body. This requires some coordination with debugger to get this working. - The debugger needs to be aware of prolog_end attribute attached with line table entries. - The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+) llvm-svn: 126155
* 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
OpenPOWER on IntegriCloud