summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervals.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Uncomment assertions that register# != 0 on calls toAlkis Evlogimenos2004-02-261-2/+2
| | | | | | | MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes to relevant files. llvm-svn: 11882
* Move LiveIntervals.h up to be the first included headerAlkis Evlogimenos2004-02-231-1/+1
| | | | llvm-svn: 11721
* Move LiveIntervals.h to lib/CodeGen since it shouldn't be exposed to other ↵Alkis Evlogimenos2004-02-231-1/+1
| | | | | | parts of the compiler llvm-svn: 11719
* Print basic block boundaries in machine instruction debug output.Alkis Evlogimenos2004-02-221-4/+7
| | | | llvm-svn: 11704
* Abstract merging of ranges away from number of slots per instruction.Alkis Evlogimenos2004-02-221-3/+7
| | | | | | | Also make it less aggressive as the current implementation breaks in some cases. llvm-svn: 11696
* Make 'fold' statistic's description the same in both allocators.Alkis Evlogimenos2004-02-211-1/+1
| | | | llvm-svn: 11687
* Some more statistics improvements.Alkis Evlogimenos2004-02-201-11/+17
| | | | llvm-svn: 11676
* Disambiguate statistic descriptions.Alkis Evlogimenos2004-02-201-1/+1
| | | | llvm-svn: 11675
* Rename statistic and add another one.Alkis Evlogimenos2004-02-201-3/+6
| | | | llvm-svn: 11674
* Too many changes in one commit:Alkis Evlogimenos2004-02-201-70/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. LiveIntervals now implement a 4 slot per instruction model. Load, Use, Def and a Store slot. This is required in order to correctly represent caller saved register clobbering on function calls, register reuse in the same instruction (def resues last use) and also spill code added later by the allocator. The previous representation (2 slots per instruction) was insufficient and as a result was causing subtle bugs. 2. Fixes in spill code generation. This was the major cause of failures in the test suite. 3. Linear scan now has core support for folding memory operands. This is untested and not enabled (the live interval update function does not attempt to fold loads/stores in instructions). 4. Lots of improvements in the debugging output of both live intervals and linear scan. Give it a try... it is beautiful :-) In summary the above fixes all the issues with the recent reserved register elimination changes and get the allocator very close to the next big step: folding memory operands. llvm-svn: 11654
* Be more agressive when joining ranges.Alkis Evlogimenos2004-02-181-9/+9
| | | | llvm-svn: 11575
* Fix overly conservative spill interval computation.Alkis Evlogimenos2004-02-181-4/+3
| | | | llvm-svn: 11574
* Fix spilled interval update. It was too conservative.Alkis Evlogimenos2004-02-171-1/+4
| | | | llvm-svn: 11516
* Eliminate the use of spill (reserved) registers.Alkis Evlogimenos2004-02-151-33/+103
| | | | llvm-svn: 11476
* Use std::numeric_limits<float>::infinity() instead ofAlkis Evlogimenos2004-02-141-1/+1
| | | | | | | std::numeric_limits<float>::max() for weighting preallocated intervals. llvm-svn: 11427
* Remove getAllocatedRegNum(). Use getReg() instead.Alkis Evlogimenos2004-02-131-2/+2
| | | | llvm-svn: 11393
* Change MachineBasicBlock's vector of MachineInstr pointers into anAlkis Evlogimenos2004-02-121-27/+23
| | | | | | | | | ilist of MachineInstr objects. This allows constant time removal and insertion of MachineInstr instances from anywhere in each MachineBasicBlock. It also allows for constant time splicing of MachineInstrs into or out of MachineBasicBlocks. llvm-svn: 11340
* Do not use MachineOperand::isVirtualRegister either!Chris Lattner2004-02-101-1/+2
| | | | llvm-svn: 11283
* Change live interval representation. Machine instructions now have twoAlkis Evlogimenos2004-02-051-22/+31
| | | | | | | | | | | | | | | | | | slots each. As a concequence they get numbered as 0, 2, 4 and so on. The first slot is used for operand uses and the second for defs. Here's an example: 0: A = ... 2: B = ... 4: C = A + B ;; last use of A The live intervals should look like: A = [1, 5) B = [3, x) C = [5, y) llvm-svn: 11141
* We don't need to scan the blocks that we are live-in on everyAlkis Evlogimenos2004-02-051-12/+13
| | | | | | access. Rather we only have to do it on the creation of the interval. llvm-svn: 11135
* Should be more careful. The previously applied change made all countsAlkis Evlogimenos2004-02-021-10/+6
| | | | | | outside of loops = 0. llvm-svn: 11085
* Change string for joined intervals.Alkis Evlogimenos2004-02-011-1/+1
| | | | llvm-svn: 11057
* Change xor to ^.Alkis Evlogimenos2004-02-011-1/+1
| | | | llvm-svn: 11054
* Missed one silly assert :-)Alkis Evlogimenos2004-02-011-1/+1
| | | | llvm-svn: 11048
* Simplify joinIntervals() code.Alkis Evlogimenos2004-02-011-62/+57
| | | | llvm-svn: 11047
* Use MRegisterInfo::isPhysicalRegister andAlkis Evlogimenos2004-02-011-11/+11
| | | | | | MRegisterInfo::isVirtualRegister. llvm-svn: 11045
* Apply final part of Chris' patch.Alkis Evlogimenos2004-01-311-11/+9
| | | | llvm-svn: 11040
* Be a little smarter on the way we handle physical register defs.Alkis Evlogimenos2004-01-311-26/+13
| | | | llvm-svn: 11038
* Merge safe parts from last night's buggy commit. These do not breakAlkis Evlogimenos2004-01-311-47/+71
| | | | | | any test cases :-) llvm-svn: 11032
* Optimize liveAt() and overlaps(). We now use a binary search insteadAlkis Evlogimenos2004-01-311-20/+30
| | | | | | | | of a linear search to find the first range for comparisons. This cuts down the linear scan register allocator running time by a factor of 3 in 254.perlbmk and by a factor of 2.2 in 176.gcc. llvm-svn: 11030
* Revert last night's changes as they broke some tests. Will remerge parts of ↵Alkis Evlogimenos2004-01-311-105/+105
| | | | | | the patch. llvm-svn: 11029
* Several performance enhancements and cleanups from Chris.Alkis Evlogimenos2004-01-311-105/+105
| | | | | | | Simplification of LiveIntervals::Interval::overlaps() and addition of examples to overlaps() and liveAt() to make them clearer. llvm-svn: 11028
* Fix failing test cases with joined live intervals. It turns out thatAlkis Evlogimenos2004-01-231-3/+24
| | | | | | | | | when joining we need to check if we overlap with the second interval or any of its aliases. Also make joining intervals the default. llvm-svn: 10973
* Add option to join live intervals. Two intervals are joined if thereAlkis Evlogimenos2004-01-221-40/+169
| | | | | | | | | | | | | | is a move between two registers, at least one of the registers is virtual and the two live intervals do not overlap. This results in about 40% reduction in intervals, 30% decrease in the register allocators running time and a 20% increase in peephole optimizations (mainly move eliminations). The option can be enabled by passing -join-liveintervals where appropriate. llvm-svn: 10965
* Revert previous change. The code was correct...Alkis Evlogimenos2004-01-221-1/+1
| | | | llvm-svn: 10957
* Fix incorrect negatives in LiveIntervals::Interval::liveAt().Alkis Evlogimenos2004-01-221-1/+1
| | | | llvm-svn: 10956
* Add asserts to previous change.Alkis Evlogimenos2004-01-161-2/+6
| | | | llvm-svn: 10893
* Use a list instead of a vector to store intervals. This will be neededAlkis Evlogimenos2004-01-161-7/+6
| | | | | | when we join intervals and one of the two will need to be removed. llvm-svn: 10892
* Properly update #intervals statistic.Alkis Evlogimenos2004-01-141-0/+2
| | | | llvm-svn: 10847
* Fix bug in LiveIntervals::Interval::overlaps andAlkis Evlogimenos2004-01-141-3/+3
| | | | | | | LiveIntervals::Interval::liveAt. Both were considering the live ranges closed in the end, when they are actually open. llvm-svn: 10835
* Fix miscomputation of live intervals. The catch is that registers canAlkis Evlogimenos2004-01-131-0/+17
| | | | | | | be dead at the defining instruction but can only be killed in subsequent ones. llvm-svn: 10833
* Remove allocatable registers vector. It is already provided byAlkis Evlogimenos2004-01-131-21/+2
| | | | | | LiveVariables. llvm-svn: 10830
* Cleanup debugging output.Alkis Evlogimenos2004-01-131-9/+6
| | | | llvm-svn: 10824
* Fix output of live intervals to show correctly its closed, openAlkis Evlogimenos2004-01-131-1/+1
| | | | | | ranges, i.e. [a,b) llvm-svn: 10822
* Correctly compute live variable information for physical registersAlkis Evlogimenos2004-01-131-11/+6
| | | | | | | | | | | | | | when an implicitely defined register is later used by an alias. For example: call foo %reg1024 = mov %AL The call implicitely defines EAX but only AL is used. Before this fix no information was available on AL. Now EAX and all its aliases except AL get defined and die at the call instruction whereas AL lives to be killed by the assignment. llvm-svn: 10813
* Change implementation of LiveIntervals::overlap(). This results in aAlkis Evlogimenos2004-01-071-10/+22
| | | | | | 30-50% decrease in running time of the linear scan register allocator. llvm-svn: 10707
* Remove simple coalescing.Alkis Evlogimenos2004-01-051-15/+0
| | | | llvm-svn: 10695
* Add coalescing to register allocator. A hint is added to each intervalAlkis Evlogimenos2003-12-281-1/+17
| | | | | | | | | | | which denotes the register we would like to be assigned to (virtual or physical). In register allocation, if this hint exists and we can map it to a physical register (it is either a physical register or it is a virtual register that already got assigned to a physical one) we use that register if it is available instead of a random one in the free pool. llvm-svn: 10634
* Do a separate pass to compute spill weights because doing it inlineAlkis Evlogimenos2003-12-241-10/+27
| | | | | | | | with live intervals was missing registers that were used before they were defined (in the arbitrary order live intervals numbers instructions). llvm-svn: 10603
* Fix crash when compiling twolf.Alkis Evlogimenos2003-12-221-1/+2
| | | | llvm-svn: 10584
OpenPOWER on IntegriCloud