summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocBase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Modules] Remove potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-221-1/+2
| | | | | | | | | | | | define below all header includes in the lib/CodeGen/... tree. While the current modules implementation doesn't check for this kind of ODR violation yet, it is likely to grow support for it in the future. It also removes one layer of macro pollution across all the included headers. Other sub-trees will follow. llvm-svn: 206837
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-141-1/+1
| | | | | | instead of comparing to nullptr. llvm-svn: 206142
* Phase 1 of refactoring the MachineRegisterInfo iterators to make them suitableOwen Anderson2014-03-131-4/+9
| | | | | | | | | | | | | | | | | | | for use with C++11 range-based for-loops. The gist of phase 1 is to remove the skipInstruction() and skipBundle() methods from these iterators, instead splitting each iterator into a version that walks operands, a version that walks instructions, and a version that walks bundles. This has the result of making some "clever" loops in lib/CodeGen more verbose, but also makes their iterator invalidation characteristics much more obvious to the casual reader. (Making them concise again in the future is a good motivating case for a pre-incrementing range adapter!) Phase 2 of this undertaking with consist of removing the getOperand() method, and changing operator*() of the operand-walker to return a MachineOperand&. At that point, it should be possible to add range views for them that work as one might expect. llvm-svn: 203757
* Fix typoManman Ren2014-02-221-1/+1
| | | | llvm-svn: 201944
* DEBUG shouldEvict decisionsAndrew Trick2013-11-221-2/+2
| | | | llvm-svn: 195490
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-191-0/+3
| | | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 195064
* Revert r194865 and r194874.Alexey Samsonov2013-11-181-3/+0
| | | | | | | | | | | | This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. llvm-svn: 194997
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-151-0/+3
| | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
* Print register in LiveInterval::print()Matthias Braun2013-10-101-1/+1
| | | | llvm-svn: 192398
* Emit a better error when running out of registers on inline asm.Benjamin Kramer2013-10-051-3/+2
| | | | | | | | | The most likely case where this error happens is when the user specifies too many register operands. Don't make it look like an internal LLVM bug when we can see that the error is coming from an inline asm instruction. For other instructions we keep the "ran out of registers" error. llvm-svn: 192041
* Track new virtual registers by register number.Mark Lacey2013-08-141-2/+2
| | | | | | | | | | Track new virtual registers by register number, rather than by the live interval created for them. This is the first step in separating the creation of new virtual registers and new live intervals. Eventually live intervals will be created and populated on demand after the virtual registers have been created and used in instructions. llvm-svn: 188434
* Make constant string pointer into an array to remove a pointer lookup for ↵Craig Topper2013-07-171-1/+1
| | | | | | every access. llvm-svn: 186482
* Make the LiveRegMatrix analysis available to targets.Jakob Stoklund Olesen2012-11-281-2/+2
| | | | | | | | | | | No functional change, just moved header files. Targets can inject custom passes between register allocation and rewriting. This makes it possible to tweak the register allocation before rewriting, using the full global interference checking available from LiveRegMatrix. llvm-svn: 168806
* Revert r168630, r168631, and r168633 as these are causing nightly test failures.Chad Rosier2012-11-281-0/+1
| | | | llvm-svn: 168751
* Now that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,Chad Rosier2012-11-261-1/+0
| | | | | | | | | r168627), we no longer need to call the freezeReservedRegs() function a second time. Previously, this pass was conservatively adding the FP to the set of reserved registers, requiring the second update to the reserved registers. rdar://12719844 llvm-svn: 168630
* Remove LiveIntervalUnions from RegAllocBase.Jakob Stoklund Olesen2012-06-201-107/+6
| | | | | | They are living in LiveRegMatrix now. llvm-svn: 158868
* Convert RABasic to using LiveRegMatrix interference checking.Jakob Stoklund Olesen2012-06-201-0/+13
| | | | | | | Stop using the LiveIntervalUnions provided by RegAllocBase, they will be removed soon. llvm-svn: 158866
* Avoid iterating with LiveIntervals::iterator.Jakob Stoklund Olesen2012-06-201-19/+25
| | | | | | | | | | That is a DenseMap iterator keyed by pointers, so the iteration order is nondeterministic. I would like to replace the DenseMap with an IndexedMap which doesn't allow iteration. llvm-svn: 158856
* Also compute MBB live-in lists in the new rewriter pass.Jakob Stoklund Olesen2012-06-091-38/+0
| | | | | | | | | This deduplicates some code from the optimizing register allocators, and it means that it is now possible to change the register allocators' solutions simply by editing the VirtRegMap between the register allocator pass and the rewriter. llvm-svn: 158249
* Move LiveUnionArray into LiveIntervalUnion.hJakob Stoklund Olesen2012-06-051-26/+8
| | | | | | It is useful outside RegAllocBase. llvm-svn: 158041
* Don't print register names in LiveIntervalUnion::print().Jakob Stoklund Olesen2012-06-051-1/+1
| | | | | | | | Soon we'll be making LiveIntervalUnions for register units as well. This was the only place using the RepReg member, so just remove it. llvm-svn: 158038
* Simplify LiveInterval::print().Jakob Stoklund Olesen2012-06-051-1/+1
| | | | | | | | | | Don't print out the register number and spill weight, making the TRI argument unnecessary. This allows callers to interpret the reg field. It can currently be a virtual register, a physical register, a spill slot, or a register unit. llvm-svn: 158031
* Switch all register list clients to the new MC*Iterator interface.Jakob Stoklund Olesen2012-06-011-3/+3
| | | | | | | | | | | | | No functional change intended. Sorry for the churn. The iterator classes are supposed to help avoid giant commits like this one in the future. The TableGen-produced register lists are getting quite large, and it may be necessary to change the table representation. This makes it possible to do so without changing all clients (again). llvm-svn: 157854
* Don't look for empty live ranges in the unions.Jakob Stoklund Olesen2012-05-121-1/+4
| | | | | | | | | Empty live ranges represent undef and still get allocated, but they won't appear in LiveIntervalUnions. Patch by Patrik Hägglund! llvm-svn: 156685
* Moved LiveRangeEdit.h so that it can be called from other parts of the ↵Pete Cooper2012-04-021-1/+1
| | | | | | backend, not just libCodeGen llvm-svn: 153906
* Use uint16_t to store register overlaps to reduce static data.Craig Topper2012-03-041-1/+1
| | | | llvm-svn: 152001
* Sink spillInterferences into RABasic.Jakob Stoklund Olesen2012-01-111-54/+0
| | | | | | This helper method is too simplistic for RAGreedy. llvm-svn: 147976
* Move RegAllocBase into its own cpp file separate from RABasic.Jakob Stoklund Olesen2012-01-111-0/+334
No functional change. llvm-svn: 147972
OpenPOWER on IntegriCloud