summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PreAllocSplitting.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix assert(0) conversion, as suggested by Chris.Torok Edwin2009-07-121-4/+1
| | | | llvm-svn: 75423
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-2/+2
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Improved tracking of value number kills. VN kills are now representedLang Hames2009-07-091-8/+9
| | | | | | | | | | | | as an (index,bool) pair. The bool flag records whether the kill is a PHI kill or not. This code will be used to enable splitting of live intervals containing PHI-kills. A slight change to live interval weights introduced an extra spill into lsr-code-insertion (outside the critical sections). The test condition has been updated to reflect this. llvm-svn: 75097
* VNInfo cleanup.Lang Hames2009-06-171-21/+21
| | | | llvm-svn: 73634
* In some rare cases, the register allocator can spill registers but end up ↵Evan Cheng2009-05-031-4/+3
| | | | | | | | | | not utilizing registers at all. The fundamental problem is linearscan's backtracking can end up freeing more than one allocated registers. However, reloads and restores might be folded into uses / defs and freed registers might not be used at all. VirtRegMap keeps track of allocations so it knows what's not used. As a horrible hack, the stack coloring can color spill slots with *free* registers. That is, it replace reload and spills with copies from and to the free register. It unfold instructions that load and store the spill slot and replace them with register using variants. Not yet enabled. This is part 1. More coming. llvm-svn: 70787
* Fix pr3954. The register scavenger asserts for inline assembly withBob Wilson2009-04-091-2/+2
| | | | | | | | | | | | register destinations that are tied to source operands. The TargetInstrDescr::findTiedToSrcOperand method silently fails for inline assembly. The existing MachineInstr::isRegReDefinedByTwoAddr was very close to doing what is needed, so this revision makes a few changes to that method and also renames it to isRegTiedToUseOperand (for consistency with the very similar isRegTiedToDefOperand and because it handles both two-address instructions and inline assembly with tied registers). llvm-svn: 68714
* Remove the "fast" cases for spill and restore point determination, as these ↵Owen Anderson2009-03-311-126/+59
| | | | | | | | were subtlely wrong in obscure cases. Patch the testcase to account for this change. llvm-svn: 68093
* Give the pre-alloc splitter access to the VirtRegMap. It doesn't do anythingOwen Anderson2009-03-141-0/+8
| | | | | | useful with it at the moment, but it will in the future. llvm-svn: 67012
* (Hopefully) silence a warning.Owen Anderson2009-03-051-1/+1
| | | | llvm-svn: 66158
* Be more careful about choosing restore points when doing restore folding. ↵Owen Anderson2009-03-051-5/+28
| | | | | | This fixes some subtle miscompilations. llvm-svn: 66147
* Add a restore folder, which shaves a dozen or so machineinstrs off oggenc. ↵Owen Anderson2009-03-041-6/+75
| | | | | | Update a testcase to check this. llvm-svn: 66029
* Fix a crash in the pre-alloc splitter exposed by recent codegen changes.Owen Anderson2009-02-201-0/+6
| | | | llvm-svn: 65121
* Add TargetInstrInfo::isSafeToMoveRegisterClassDefs. It returns true if it's ↵Evan Cheng2009-02-061-1/+4
| | | | | | safe to move an instruction which defines a value in the register class. Replace pre-splitting specific IgnoreRegisterClassBarriers with this new hook. llvm-svn: 63936
* Pre-alloc splitting needs to be more careful to avoid inserting spills/restoresOwen Anderson2009-02-051-22/+72
| | | | | | | between call frame setup/restore points. Unfortunately, this regresses code size a bit, but at least it's correct now! llvm-svn: 63837
* MergeValueInto is too smart: it might choose to do the merge the opposite ↵Owen Anderson2009-02-021-2/+18
| | | | | | | | | direction. Live interval reconstruction needs to account for this, and scour its maps to prevent dangling references. llvm-svn: 63558
* Refactor PerformPHIConstruction, no functionality changes.Evan Cheng2009-02-021-125/+165
| | | | llvm-svn: 63536
* Fix test failures causes by my previous commit.Owen Anderson2009-02-011-0/+1
| | | | llvm-svn: 63492
* Fix an issue in PHI construction that was exposed by GCC 4.2 producing a ↵Owen Anderson2009-02-011-40/+27
| | | | | | different set iteration order for the reg_iterator. llvm-svn: 63490
* Correct the algorithms for choosing spill and restore points so that we ↵Owen Anderson2009-01-291-2/+23
| | | | | | | | don't try to insert loads/stores between call frame setup and the actual call. This fixes the last known failure for the pre-alloc-splitter. llvm-svn: 63339
* Fix an issue where restores could be inserted after a terminator instruction,Owen Anderson2009-01-291-4/+12
| | | | | | | | and an iterator invalidation issue. FreeBench/pifft no longer miscompiles with these fixes! llvm-svn: 63293
* Comments are good. :-)Owen Anderson2009-01-291-3/+30
| | | | llvm-svn: 63276
* Add support for aggressive load-use-store folding. This takes care of the Owen Anderson2009-01-291-19/+85
| | | | | | vast majority of code size regressions introduced by pre-alloc-splitting. llvm-svn: 63274
* Make the pre-split-limit option more useful by using a per-function counter.Owen Anderson2009-01-271-1/+7
| | | | llvm-svn: 63091
* Reapply r63025 and r63026, with fixes for the failing testcases.Owen Anderson2009-01-261-356/+13
| | | | llvm-svn: 63049
* Also revert r63206Bill Wendling2009-01-261-0/+321
| | | | llvm-svn: 63041
* Temporarily revert r63025 until the testsuite failures can be fixed.Bill Wendling2009-01-261-12/+34
| | | | llvm-svn: 63040
* Get rid of a bunch of dead code now that interval reconstruction is enabled.Owen Anderson2009-01-261-321/+0
| | | | llvm-svn: 63026
* Fix an issue where LiveIntervals was trying to be smart about removing killOwen Anderson2009-01-261-34/+12
| | | | | | | | | markers, and ended up foiling the interval reconstruction. This allows us to turn on reconstruction in the pre alloc splitter, which fixes a number of miscompilations. llvm-svn: 63025
* Silence a bogus compiler warning.Evan Cheng2009-01-261-1/+1
| | | | llvm-svn: 63021
* Some cleanups. No functional changes.Owen Anderson2009-01-241-26/+34
| | | | llvm-svn: 62917
* Stage two of fixing pre-alloc-splitting's code size issues: filter out ↵Owen Anderson2009-01-231-9/+37
| | | | | | | | | | restores that are just going to be re-spilled again. This also helps performance. Pre-alloc-splitting now seems to be an overall win on SPEC. llvm-svn: 62834
* Add an initial pass at dead spill/restore removal for pre alloc splitting.Owen Anderson2009-01-231-4/+56
| | | | llvm-svn: 62821
* I accidentally removed this check in an earlier commit, which cause breakage ↵Owen Anderson2009-01-211-0/+4
| | | | | | in the pre alloc splitter. llvm-svn: 62678
* Be more aggressive about renumbering vregs after splitting them.Owen Anderson2009-01-211-3/+7
| | | | llvm-svn: 62639
* Change TargetInstrInfo::isMoveInstr to return source and destination ↵Evan Cheng2009-01-201-3/+3
| | | | | | sub-register indices as well. llvm-svn: 62600
* More two-address fixes. This gets lua working with join-creation enabled.Owen Anderson2009-01-121-6/+10
| | | | llvm-svn: 62073
* 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. llvm-svn: 61802
* 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. llvm-svn: 61723
* Get live interval reconstruction several steps closer to working.Owen Anderson2008-12-311-66/+86
| | | | llvm-svn: 61514
* Add braces, as suggested by a gcc warning.Duncan Sands2008-12-291-4/+6
| | | | llvm-svn: 61465
* Fix up kill/dead marking in the new live interval reconstruction code.Owen Anderson2008-12-281-6/+18
| | | | llvm-svn: 61460
* Add prototype code for recomputing a live interval's ranges and valnos ↵Owen Anderson2008-12-281-1/+260
| | | | | | through recursive phi construction. llvm-svn: 61458
* Re-apply r61158 in a form that no longer breaks tests.Owen Anderson2008-12-181-36/+61
| | | | llvm-svn: 61182
* Revert r61158 for now, as it caused some test failures.Owen Anderson2008-12-171-46/+36
| | | | llvm-svn: 61159
* Fix miscompilations caused by renumbering, and enable it as part of prealloc ↵Owen Anderson2008-12-171-36/+46
| | | | | | splitting. llvm-svn: 61158
* 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. llvm-svn: 61104
* 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. llvm-svn: 60652
* Factor out some common code.Owen Anderson2008-12-041-76/+39
| | | | llvm-svn: 60553
* Add support for folding spills into preceding defs when doing pre-alloc ↵Owen Anderson2008-12-021-27/+101
| | | | | | splitting. llvm-svn: 60433
* Add support for rematerialization in pre-alloc-splitting.Owen Anderson2008-11-191-3/+95
| | | | llvm-svn: 59587
OpenPOWER on IntegriCloud