aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/PreAllocSplitting.cpp
Commit message (Collapse)AuthorAgeFilesLines
* More two-address fixes. This gets lua working with join-creation enabled.Owen Anderson2009-01-121-6/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62073 91177308-0d34-0410-b5e6-96231b3b80d8
* The phi construction algorithm used for interval reconstruction is ↵Owen Anderson2009-01-061-13/+27
| | | | | | | | | | | | complicated by two address instructions. We need to keep track of things we've processed AS USES independetly of whether we've processed them as defs. This fixes all known miscompilations when reconstruction is turned on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61802 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of sentinel insertion in interval reconstruction. It just masked theOwen Anderson2009-01-051-5/+0
| | | | | | | problem, rather than fixing it. The problem has now been fixed the right way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61723 91177308-0d34-0410-b5e6-96231b3b80d8
* Get live interval reconstruction several steps closer to working.Owen Anderson2008-12-311-66/+86
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61514 91177308-0d34-0410-b5e6-96231b3b80d8
* Add braces, as suggested by a gcc warning.Duncan Sands2008-12-291-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61465 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up kill/dead marking in the new live interval reconstruction code.Owen Anderson2008-12-281-6/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61460 91177308-0d34-0410-b5e6-96231b3b80d8
* Add prototype code for recomputing a live interval's ranges and valnos ↵Owen Anderson2008-12-281-1/+260
| | | | | | through recursive phi construction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61458 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r61158 in a form that no longer breaks tests.Owen Anderson2008-12-181-36/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61182 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r61158 for now, as it caused some test failures.Owen Anderson2008-12-171-46/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61159 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix miscompilations caused by renumbering, and enable it as part of prealloc ↵Owen Anderson2008-12-171-36/+46
| | | | | | splitting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61158 91177308-0d34-0410-b5e6-96231b3b80d8
* Add code to renumber split intervals into new vregs. This is disabled for ↵Owen Anderson2008-12-161-0/+48
| | | | | | now until I finish working out some iterator invalidation issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61104 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to top-down mode and fix a crasher this exposed caused by an error in theOwen Anderson2008-12-071-1/+11
| | | | | | | live interval updating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60652 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out some common code.Owen Anderson2008-12-041-76/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60553 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for folding spills into preceding defs when doing pre-alloc ↵Owen Anderson2008-12-021-27/+101
| | | | | | splitting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60433 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for rematerialization in pre-alloc-splitting.Owen Anderson2008-11-191-3/+95
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59587 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug introduced by my previous patch. With this change, SPEC is now ↵Owen Anderson2008-11-181-1/+1
| | | | | | clean with prealloc splitting enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59544 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allow the restore point to be placed after terminators. With this change,Owen Anderson2008-11-131-2/+2
| | | | | | | | MultiSource/Applications is clean with the prealloc splitter. Some failures remain in SPEC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59267 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't walk into predecessors in which the vreg is not live when doing ↵Owen Anderson2008-11-111-0/+2
| | | | | | | | | shrinkwrapping. This lets several failing tests get farther along, but doesn't completely fix any of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59086 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new predicate to control when we do prealloc splitting. Fix a small ↵Owen Anderson2008-11-051-1/+5
| | | | | | bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58738 91177308-0d34-0410-b5e6-96231b3b80d8
* First pass at checking for the creation of a new join point when doing ↵Owen Anderson2008-11-041-0/+73
| | | | | | pre-alloc splitting. This is not turned on yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58726 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my last patch until I consult with Evan about it.Owen Anderson2008-11-031-10/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58591 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't do pre-splitting if doing so would create a value join that did notOwen Anderson2008-11-021-0/+10
| | | | | | | | | | exist before. Updating the live intervals in that care is tricky in the general case. Evan, if you see a tighter guard condition for this, let me know. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58560 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a fixme.Evan Cheng2008-10-311-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58514 91177308-0d34-0410-b5e6-96231b3b80d8
* - More pre-split fixes: spill slot live interval computation bug; restore ↵Evan Cheng2008-10-291-38/+93
| | | | | | | | | point bug. - If a def is spilt, remember its spill index to allow its reuse. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58375 91177308-0d34-0410-b5e6-96231b3b80d8
* - Rewrite code that update register live interval that's split.Evan Cheng2008-10-291-81/+152
| | | | | | | | - Create and update spill slot live intervals. - Lots of bug fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58367 91177308-0d34-0410-b5e6-96231b3b80d8
* If def is in the same mbb as the barrier, spilt the value after the last use ↵Evan Cheng2008-10-281-8/+18
| | | | | | before the barrier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58314 91177308-0d34-0410-b5e6-96231b3b80d8
* Add command line option to limit the number splits to help debugging.Evan Cheng2008-10-281-3/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58312 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid putting a split past the end of the live range; always shrink wrap ↵Evan Cheng2008-10-281-11/+20
| | | | | | live interval in the barrier mbb. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58309 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence a bogus compile time warning.Evan Cheng2008-10-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58297 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove val# defined by a remat'ed def that is now dead.Evan Cheng2008-10-271-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58294 91177308-0d34-0410-b5e6-96231b3b80d8
* For now, don't split live intervals around x87 stack register barriers. ↵Evan Cheng2008-10-271-0/+2
| | | | | | FpGET_ST0_80 must be right after a call instruction (and ADJCALLSTACKUP) so we need to find a way to prevent reload of x87 registers between them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58230 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not shrink wrap live interval in a mbb if it's livein any of its ↵Evan Cheng2008-10-261-6/+21
| | | | | | successor blocks. The mbb can be revisited again after all of the successors are processed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58184 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle cases where there aren't uses in the barrier mbb.Evan Cheng2008-10-251-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58174 91177308-0d34-0410-b5e6-96231b3b80d8
* If val# def is ~0U, meaning it's defined by a PHI, and it's previously ↵Evan Cheng2008-10-251-9/+11
| | | | | | split, spill before the barrier because it's impossible to determine if all the defs are spilled in the same spill slot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58129 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a pasto.Evan Cheng2008-10-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58102 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a end() dereference; remove an abort() that wasn't meant to be left in.Evan Cheng2008-10-241-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58072 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid splitting an interval multiple times; avoid splitting ↵Evan Cheng2008-10-241-51/+106
| | | | | | re-materializable val# (for now). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58068 91177308-0d34-0410-b5e6-96231b3b80d8
* Committing a good chunk of the pre-register allocation live interval ↵Evan Cheng2008-10-231-12/+571
| | | | | | splitting pass. It's handling simple cases and appear to do good things. Next: avoid splitting an interval multiple times; renumber registers when possible; record stack slot live intervals for coloring; rematerialize defs when possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58044 91177308-0d34-0410-b5e6-96231b3b80d8
* Add skeleton for the pre-register allocation live interval splitting pass.Evan Cheng2008-10-201-0/+81
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57847 91177308-0d34-0410-b5e6-96231b3b80d8