summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* lib/CodeGen/AsmPrinter/CMakeLists.txt: Fix CMake build, following up to r127099.NAKAMURA Takumi2011-03-061-0/+1
| | | | llvm-svn: 127114
* Disable a couple of experimental heuristics to get the best results from the ↵Andrew Trick2011-03-061-2/+2
| | | | | | current implementation of -pre-RA-sched=list-ilp. llvm-svn: 127113
* Some first rudimentary support for ARM EHABI: print exception table in "text ↵Anton Korobeynikov2011-03-054-0/+123
| | | | | | mode". llvm-svn: 127099
* Add FrameSetup MI flagsAnton Korobeynikov2011-03-051-10/+23
| | | | llvm-svn: 127098
* Work around a coalescer bug.Jakob Stoklund Olesen2011-03-052-4/+23
| | | | | | | | | | | | The coalescer can in very rare cases leave too large live intervals around after rematerializing cheap-as-a-move instructions. Linear scan doesn't really care, but live range splitting gets very confused when a live range is killed by a ghost instruction. I will fix this properly in the coalescer after 2.9 branches. llvm-svn: 127096
* Be explicit with abs(). Visual Studio workaround.Andrew Trick2011-03-051-4/+6
| | | | llvm-svn: 127075
* Fix for -sched-high-latency-cycles in sched=list-ilp mode.Andrew Trick2011-03-051-1/+3
| | | | llvm-svn: 127071
* Missing comment.Andrew Trick2011-03-051-0/+2
| | | | llvm-svn: 127068
* Increased the register pressure limit on x86_64 from 8 to 12Andrew Trick2011-03-052-23/+156
| | | | | | | | | | | | | | | | | | | | | | | regs. This is the only change in this checkin that may affects the default scheduler. With better register tracking and heuristics, it doesn't make sense to artificially lower the register limit so much. Added -sched-high-latency-cycles and X86InstrInfo::isHighLatencyDef to give the scheduler a way to account for div and sqrt on targets that don't have an itinerary. It is currently defaults to 10 (the actual number doesn't matter much), but only takes effect on non-default schedulers: list-hybrid and list-ilp. Added several heuristics that can be individually disabled for the non-default sched=list-ilp mode. This helps us determine how much better we can do on a given benchmark than the default scheduler. Certain compute intensive loops run much faster in this mode with the right set of heuristics, and it doesn't seem to have much negative impact elsewhere. Not all of the heuristics are needed, but we still need to experiment to decide which should be disabled by default for sched=list-ilp. llvm-svn: 127067
* Rework the global split cost calculation.Jakob Stoklund Olesen2011-03-051-21/+30
| | | | | | | The global cost is the sum of block frequencies for spill code that must be inserted because preferences weren't met. llvm-svn: 127062
* Compute the constraints for global live range splitting from an interference ↵Jakob Stoklund Olesen2011-03-051-163/+67
| | | | | | | | | | | pattern. This simplifies the code and makes it faster too. The interference patterns are saved for each candidate register. It will be reused for actually executing the split. Work in progress. llvm-svn: 127054
* Teach the register scavenger to take subregs into account when finding a ↵Jim Grosbach2011-03-051-5/+10
| | | | | | free register. llvm-svn: 127049
* Improve readability with some whitespace!Eric Christopher2011-03-041-1/+1
| | | | llvm-svn: 127043
* Extract a method. No functional change.Jakob Stoklund Olesen2011-03-041-40/+52
| | | | llvm-svn: 127040
* Go back to comparing spill weights when deciding if interference can be evicted.Jakob Stoklund Olesen2011-03-041-9/+5
| | | | | | | It gives better results. Sometimes, a live range can be large and still have high spill weight. Such a range should not be spilled. llvm-svn: 127036
* Renumber slot indexes locally when possible.Jakob Stoklund Olesen2011-03-041-2/+25
| | | | | | | | | | | | | Initially, slot indexes are quad-spaced. There is room for inserting up to 3 new instructions between the original instructions. When we run out of indexes between two instructions, renumber locally using double-spaced indexes. The original quad-spacing means that we catch up quickly, and we only have to renumber a handful of instructions to get a monotonic sequence. This is much faster than renumbering the whole function as we did before. llvm-svn: 127023
* Number SlotIndexes uniformly without looking at the number of defs on each ↵Jakob Stoklund Olesen2011-03-041-24/+5
| | | | | | | | | | | | instruction. You can't really predict how many indexes will be needed from the number of defs, so let's keep it simple. Also remove an extra empty index that was inserted after each basic block. It was intended for live-out ranges, but it was never used that way. llvm-svn: 127014
* Add SlotIndex statistics.Jakob Stoklund Olesen2011-03-041-0/+4
| | | | llvm-svn: 127007
* Tweak debug output. No functional changes.Jakob Stoklund Olesen2011-03-042-10/+6
| | | | llvm-svn: 127006
* Revert commit 126684 "Use the correct shift amount type". It is only the ↵Duncan Sands2011-03-041-1/+1
| | | | | | | | | | | correct type after type legalization has completed. Before then it may simply not be big enough to hold the shift amount, particularly on x86 which uses a very small type for shifts (this issue broke stuff in the past which is why LegalizeTypes carefully uses a large type for shift amounts). llvm-svn: 127000
* Minor pre-RA-sched fixes and cleanup.Andrew Trick2011-03-041-7/+15
| | | | | | | | Fix the PendingQueue, then disable it because it's not required for the current schedulers' heuristics. Fix the logic for the unused list-ilp scheduler. llvm-svn: 126981
* Precompute block frequencies, pow() isn't free.Jakob Stoklund Olesen2011-03-043-17/+15
| | | | llvm-svn: 126975
* Use an IndexedMap instead of a DenseMap for the live-out cache.Jakob Stoklund Olesen2011-03-042-48/+47
| | | | | | | This speeds up updateSSA() so it only accounts for 5% of the live range splitting time. llvm-svn: 126972
* There are times when the landing pad won't have a call to 'eh.selector' inBill Wendling2011-03-031-9/+23
| | | | | | | | | | | | | | it. It's been assumed up til now that it would be in its immediate successor. However, this isn't necessarily the case. It could be in one of its successor's successors. Modify the code to more thoroughly check for an 'eh.selector' call in successors. It only looks at a successor if we get there as a result of an unconditional branch. Testcase ObjC/exceptions-4.m in r126968. llvm-svn: 126969
* Revert r123908; the code in question is completely untested and wrong.Eli Friedman2011-03-032-28/+0
| | | | llvm-svn: 126964
* Fix typo.Devang Patel2011-03-031-1/+1
| | | | llvm-svn: 126962
* Fix thinko in previous check-in.Devang Patel2011-03-031-1/+3
| | | | | | Add comment. llvm-svn: 126959
* llvm::Function argument count is not a good indicator of how many arugments ↵Devang Patel2011-03-031-1/+4
| | | | | | does the function have at source level. If we need more space, just resize vector conservatively. This vector is only used once per function. llvm-svn: 126957
* Allow a target to choose whether to prefer the scavenger emergency spill slotJim Grosbach2011-03-031-7/+6
| | | | | | be next to the frame pointer or the stack pointer. llvm-svn: 126956
* Renumber slot indexes uniformly instead of spacing according to the number ↵Jakob Stoklund Olesen2011-03-031-15/+1
| | | | | | | | | | of defs. There are probably much larger speedups to be had by renumbering locally instead of looping over the whole function. For now, the greedy register allocator is 25% faster. llvm-svn: 126926
* Represent sentinel slot indexes with a null pointer.Jakob Stoklund Olesen2011-03-031-31/+0
| | | | | | | | This is much faster than using a pointer to a ManagedStatic object accessed with a function call. The greedy register allocator is 5% faster overall just from the SlotIndex default constructor savings. llvm-svn: 126925
* Avoid comparing invalid slot indexes, and assert that it doesn't happen.Jakob Stoklund Olesen2011-03-032-5/+3
| | | | | | | The SlotIndex created by the default construction does not represent a position in the function, and it doesn't make sense to compare it to other indexes. llvm-svn: 126924
* Avoid comparing invalid slot indexes.Jakob Stoklund Olesen2011-03-031-4/+6
| | | | llvm-svn: 126922
* Cache basic block bounds instead of asking SlotIndexes::getMBBRange all the ↵Jakob Stoklund Olesen2011-03-033-50/+42
| | | | | | | | | time. This speeds up the greedy register allocator by 15%. DenseMap is not as fast as one might hope. llvm-svn: 126921
* Change the SplitEditor interface to a single instance can be shared for ↵Jakob Stoklund Olesen2011-03-033-41/+51
| | | | | | multiple splits. llvm-svn: 126912
* Only run the updateSSA loop when we have actually seen multiple values.Jakob Stoklund Olesen2011-03-031-3/+23
| | | | | | When only a single value has been seen, new PHIDefs are never needed. llvm-svn: 126911
* Fix PHI handling in LiveIntervals::shrinkToUses().Jakob Stoklund Olesen2011-03-031-1/+1
| | | | | | | | | We need to wait until we meet a PHIDef in its defining block before resurrecting PHIKills in the predecessors. This should unbreak the llvm-gcc-build-x86_64-darwin10-x-mingw32-x-armeabi bot. llvm-svn: 126905
* Avoid exponential blow-up when printing DAGs.Bob Wilson2011-03-021-2/+5
| | | | | | | | | | | | | David Greene changed CannotYetSelect() to print the full DAG including multiple copies of operands reached through different paths in the DAG. Unfortunately this blows up exponentially in some cases. The depth limit of 100 is way too high to prevent this -- I'm seeing a message string of 150MB with a depth of only 40 in one particularly bad case, even though the DAG has less than 200 nodes. Part of the problem is that the printing code is following chain operands, so if you fail to select an operation with a chain, the printer will follow all the chained operations back to the entry node. llvm-svn: 126899
* Turn the Edit member into a pointer so it can change dynamically.Jakob Stoklund Olesen2011-03-022-44/+44
| | | | | | No functional change. llvm-svn: 126898
* Transfer simply defined values directly without recomputing liveness and SSA.Jakob Stoklund Olesen2011-03-023-29/+75
| | | | | | | | Values that map to a single new value in a new interval after splitting don't need new PHIDefs, and if the parent value was never rematerialized the live range will be the same. llvm-svn: 126894
* Extract a method. No functional change.Jakob Stoklund Olesen2011-03-022-27/+28
| | | | llvm-svn: 126893
* Can't introduce floating-point immediate constants after legalization.Stuart Hastings2011-03-021-2/+6
| | | | | | Radar 9056407. llvm-svn: 126864
* Fix some typos.Cameron Zwarich2011-03-021-3/+3
| | | | llvm-svn: 126829
* Move extendRange() into SplitEditor and delete the LiveRangeMap class.Jakob Stoklund Olesen2011-03-022-236/+167
| | | | | | | | | Extract the updateSSA() method from the too long extendRange(). LiveOutCache can be shared among all the new intervals since there is at most one of the new ranges live out from each basic block. llvm-svn: 126818
* Quiet a compiler warning about unused variable 'ExtVNI'.Nick Lewycky2011-03-021-0/+1
| | | | llvm-svn: 126815
* Catch more cases where 2-address pass should 3-addressify instructions. ↵Evan Cheng2011-03-021-49/+70
| | | | | | rdar://9002648. llvm-svn: 126811
* Rename mapValue to extendRange because that is its function now.Jakob Stoklund Olesen2011-03-022-30/+12
| | | | | | Simplify the signature - The return value and ParentVNI are no longer needed. llvm-svn: 126809
* Simplify LiveIntervals::shrinkToUses() a bit by using the new extendInBlock().Jakob Stoklund Olesen2011-03-021-31/+19
| | | | llvm-svn: 126806
* Fix typo.Jakob Stoklund Olesen2011-03-021-1/+1
| | | | llvm-svn: 126805
* Move LiveIntervalMap::extendTo into LiveInterval itself.Jakob Stoklund Olesen2011-03-023-24/+21
| | | | | | | This method could probably be used by LiveIntervalAnalysis::shrinkToUses, and now it can use extendIntervalEndTo() which coalesces ranges. llvm-svn: 126803
OpenPOWER on IntegriCloud