summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocLinearScan.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert indentation to 2 spaces.Alkis Evlogimenos2004-08-041-438/+438
| | | | llvm-svn: 15489
* Add some comments to the backtracking code.Alkis Evlogimenos2004-07-251-2/+17
| | | | llvm-svn: 15200
* Change std::map<unsigned, LiveInterval*> into a std::map<unsigned,Alkis Evlogimenos2004-07-241-3/+3
| | | | | | | LiveInterval>. This saves some space and removes the pointer indirection caused by following the pointer. llvm-svn: 15167
* Completely eliminate the intervals_ list. instead, the r2iMap_ maintainsChris Lattner2004-07-241-9/+8
| | | | | | ownership of the intervals. llvm-svn: 15155
* Rename LiveIntervals.(cpp|h) -> LiveIntervalAnalysis.(cpp|h)Chris Lattner2004-07-231-1/+1
| | | | llvm-svn: 15135
* Some compile time improvements resulting in a 1sec speedup in the 5secAlkis Evlogimenos2004-07-221-75/+53
| | | | | | | | | | | compilation of gcc: * Use vectors instead of lists for the intervals sets * Use a heap for the unhandled set to keep intervals always sorted and makes insertions back to the heap very fast (compared to scanning a list) llvm-svn: 15103
* These files don't need to include <iostream> since they include ↵Brian Gaeke2004-07-211-1/+0
| | | | | | "Support/Debug.h". llvm-svn: 15089
* Remove dead code.Alkis Evlogimenos2004-07-191-17/+0
| | | | llvm-svn: 15011
* Fix assertion to not dereference end!Chris Lattner2004-07-191-2/+2
| | | | llvm-svn: 14991
* Add some asserts that the list of intervals returned by addIntervalsForSpillsChris Lattner2004-07-191-6/+30
| | | | | | | is sorted. This is not the case currently, which is causing no end of problems. llvm-svn: 14990
* Correctly compute the ration of iterations/#intervals.Alkis Evlogimenos2004-07-041-2/+6
| | | | llvm-svn: 14626
* Add efficiency statistic.Alkis Evlogimenos2004-07-041-1/+7
| | | | llvm-svn: 14590
* Rename Interval class to LiveInterval to avoid conflicting with the alreadyChris Lattner2004-06-211-10/+10
| | | | | | | | | existing llvm::Interval class. Patch contributed by Vladimir Prus! http://mail.cs.uiuc.edu/pipermail/llvmbugs/2004-June/000710.html llvm-svn: 14281
* Pull Interval class out of LiveIntervals.Alkis Evlogimenos2004-05-301-11/+12
| | | | llvm-svn: 13910
* When spilling an register, introduce a new temporary for each of itsAlkis Evlogimenos2004-05-301-40/+46
| | | | | | | spills. This allows for more flexibility when allocating registers for spill code. llvm-svn: 13907
* Add required headerAlkis Evlogimenos2004-05-081-0/+1
| | | | llvm-svn: 13417
* numeric_limits::infinity() apparently does not work on all systems. As aChris Lattner2004-05-061-1/+1
| | | | | | workaround, use the C HUGE_VAL macro instead. llvm-svn: 13377
* Make the set of fixed (preallocated) intervals be a fixed superset ofAlkis Evlogimenos2004-03-171-29/+10
| | | | | | | unhandled + handled. So unhandled is now including all fixed intervals and fixed intervals never changes when processing a function. llvm-svn: 12462
* Add a spiller option to llc. A simple spiller will come soon. When we get ↵Alkis Evlogimenos2004-03-011-1/+3
| | | | | | CFG in the machine code represenation a global spiller will also be possible. Also document the linear scan register allocator but mark it as experimental for now. llvm-svn: 12062
* Add the long awaited memory operand folding support for linear scanAlkis Evlogimenos2004-03-011-3/+3
| | | | llvm-svn: 12058
* Rename member function to be consistent with the rest.Alkis Evlogimenos2004-02-271-3/+3
| | | | llvm-svn: 11898
* Remove asssert since it is breaking cases that it shouldn't.Alkis Evlogimenos2004-02-251-1/+0
| | | | llvm-svn: 11841
* Add an assertionChris Lattner2004-02-251-0/+1
| | | | llvm-svn: 11830
* Move machine code rewriter and spiller outside the registerAlkis Evlogimenos2004-02-241-141/+15
| | | | | | | | | | | allocator. The implementation is completely rewritten and now employs several optimizations not exercised before. For example for 164.gzip we have 997 loads and 699 stores vs the 1221 loads and 880 stores we have before. llvm-svn: 11798
* Remove '4Virt' from member function names as it is obvious.Alkis Evlogimenos2004-02-231-12/+12
| | | | llvm-svn: 11781
* Refactor VirtRegMap out of RegAllocLinearScan as the first part of bugAlkis Evlogimenos2004-02-231-136/+45
| | | | | | 251 (providing a generic machine code rewriter/spiller). llvm-svn: 11780
* Add number of spilled registers statistic.Alkis Evlogimenos2004-02-231-0/+2
| | | | llvm-svn: 11759
* Remove implementation of default constructor as it is useless now.Alkis Evlogimenos2004-02-231-5/+0
| | | | llvm-svn: 11755
* Improved PhysRegTracker interface. RegAlloc lazily allocates the register ↵Alkis Evlogimenos2004-02-231-17/+17
| | | | | | tracker using a std::auto_ptr llvm-svn: 11738
* Fix comments in PhysRegTracker and rename isPhysRegAvail to isRegAvail to be ↵Alkis Evlogimenos2004-02-231-1/+1
| | | | | | consistent with the other two llvm-svn: 11723
* Pull PhysRegTracker out of RegAllocLinearScan as it can be used by other ↵Alkis Evlogimenos2004-02-231-59/+13
| | | | | | allocators as well llvm-svn: 11720
* Move LiveIntervals.h to lib/CodeGen since it shouldn't be exposed to other ↵Alkis Evlogimenos2004-02-231-1/+3
| | | | | | parts of the compiler llvm-svn: 11719
* Print basic block boundaries in machine instruction debug output.Alkis Evlogimenos2004-02-221-0/+1
| | | | llvm-svn: 11704
* Fix crash in debug output.Alkis Evlogimenos2004-02-201-1/+1
| | | | llvm-svn: 11659
* Fix instruction numbering in debug output.Alkis Evlogimenos2004-02-201-1/+2
| | | | llvm-svn: 11655
* Too many changes in one commit:Alkis Evlogimenos2004-02-201-97/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix RA::verifyAssignment()Alkis Evlogimenos2004-02-191-4/+8
| | | | llvm-svn: 11629
* Rename reloads/spills to loads/stores.Alkis Evlogimenos2004-02-191-5/+5
| | | | llvm-svn: 11619
* Implement assignment correctness verification.Alkis Evlogimenos2004-02-181-0/+15
| | | | llvm-svn: 11609
* Eliminate the use of spill (reserved) registers.Alkis Evlogimenos2004-02-151-303/+214
| | | | 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-1/+1
| | | | llvm-svn: 11393
* Change MachineBasicBlock's vector of MachineInstr pointers into anAlkis Evlogimenos2004-02-121-11/+10
| | | | | | | | | 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-5/+8
| | | | llvm-svn: 11283
* Increase code clarity.Alkis Evlogimenos2004-02-061-127/+100
| | | | llvm-svn: 11151
* Eliminate uneeded lookups by passing a Virt2PhysMap::iterator insteadAlkis Evlogimenos2004-02-061-23/+33
| | | | | | of the virtual register to certain functions. llvm-svn: 11143
* Modify the two address instruction pass to remove the duplicateAlkis Evlogimenos2004-02-041-29/+27
| | | | | | operand of the instruction and thus simplify the register allocation. llvm-svn: 11124
* When an instruction like: A += B had both A and B virtual registersAlkis Evlogimenos2004-02-031-10/+6
| | | | | | spilled, A was loaded from its stack location twice. This fixes the bug. llvm-svn: 11093
* Fix debugging output.Alkis Evlogimenos2004-02-021-1/+1
| | | | llvm-svn: 11088
* Create an object for tracking physical register usage. This will lookAlkis Evlogimenos2004-02-021-106/+116
| | | | | | much better when I get rid of the reserved registers. llvm-svn: 11066
OpenPOWER on IntegriCloud