summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/VirtRegMap.h
Commit message (Collapse)AuthorAgeFilesLines
* The Indexes Patch.Lang Hames2009-11-031-5/+5
| | | | | | | | | | | | | | | | This introduces a new pass, SlotIndexes, which is responsible for numbering instructions for register allocation (and other clients). SlotIndexes numbering is designed to match the existing scheme, so this patch should not cause any changes in the generated code. For consistency, and to avoid naming confusion, LiveIndex has been renamed SlotIndex. The processImplicitDefs method of the LiveIntervals analysis has been moved into its own pass so that it can be run prior to SlotIndexes. This was necessary to match the existing numbering scheme. llvm-svn: 85979
* Renamed MachineInstrIndex to LiveIndex.Lang Hames2009-10-031-5/+5
| | | | llvm-svn: 83254
* Replaces uses of unsigned for indexes in LiveInterval and VNInfo withLang Hames2009-09-041-5/+6
| | | | | | | | a new class, MachineInstrIndex, which hides arithmetic details from most clients. This is a step towards allowing the register allocator to update/insert code during allocation. llvm-svn: 81040
* remove some uses of llvm/Support/Streams.hChris Lattner2009-08-231-16/+0
| | | | llvm-svn: 79842
* Move more to raw_ostream, provide support for writing MachineBasicBlock,Daniel Dunbar2009-07-241-0/+11
| | | | | | LiveInterval, etc to raw_ostream. llvm-svn: 76965
* Move register allocation preference (or hint) from LiveInterval to ↵Evan Cheng2009-06-141-2/+6
| | | | | | MachineRegisterInfo. This allows more passes to set them. llvm-svn: 73346
* Make sure to color with only allocatable registers for the specific register ↵Evan Cheng2009-05-041-2/+6
| | | | | | class. llvm-svn: 70821
* In some rare cases, the register allocator can spill registers but end up ↵Evan Cheng2009-05-031-6/+49
| | | | | | | | | | 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
* Oy! When reverting r68073, I added in experimental code. Sorry...Bill Wendling2009-03-311-2/+0
| | | | llvm-svn: 68099
* Revert r68073. It's causing a failure in the Apple-style builds.Bill Wendling2009-03-311-0/+2
| | | | llvm-svn: 68092
* Convert VirtRegMap to a MachineFunctionPass.Owen Anderson2009-03-131-5/+18
| | | | llvm-svn: 66870
* Reorganization: Move the Spiller out of VirtRegMap.cpp into its own files. ↵Owen Anderson2009-03-111-13/+0
| | | | | | No (intended) functionality change. llvm-svn: 66720
* Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman2009-01-051-0/+1
| | | | llvm-svn: 61715
* Move #include to right place.Evan Cheng2008-06-041-1/+0
| | | | llvm-svn: 51932
* Use of implicit_def is not part of live interval. Create empty intervals for ↵Evan Cheng2008-04-111-0/+15
| | | | | | the uses when the live interval is being spilled. llvm-svn: 49542
* Fix typos in comments.Dan Gohman2008-03-121-2/+2
| | | | llvm-svn: 48297
* Transfer physical register spill info when load / store folding happens.Evan Cheng2008-03-111-0/+17
| | | | llvm-svn: 48246
* When the register allocator runs out of registers, spill a physical register ↵Evan Cheng2008-03-111-0/+40
| | | | | | around the def's and use's of the interval being allocated to make it possible for the interval to target a register and spill it right away and restore a register for uses. This likely generates terrible code but is before than aborting. llvm-svn: 48218
* Spiller now remove unused spill slots.Evan Cheng2008-02-271-5/+27
| | | | llvm-svn: 47657
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-7/+7
| | | | llvm-svn: 46930
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* MachineInstr can change. Store indexes instead.Evan Cheng2007-12-051-11/+10
| | | | llvm-svn: 44612
* If a split live interval is spilled again, remove the kill marker on its ↵Evan Cheng2007-12-051-0/+19
| | | | | | last use. llvm-svn: 44611
* Fix kill info for split intervals.Evan Cheng2007-12-051-10/+12
| | | | llvm-svn: 44609
* Remove redundant foldMemoryOperand variants and other code clean up.Evan Cheng2007-12-021-4/+3
| | | | llvm-svn: 44517
* Fixed various live interval splitting bugs / compile time issues.Evan Cheng2007-11-291-0/+41
| | | | llvm-svn: 44428
* Recover compile time regression.Evan Cheng2007-11-281-50/+25
| | | | llvm-svn: 44386
* Live interval splitting:Evan Cheng2007-11-171-7/+97
| | | | | | | | | | | | | | | | | | | When a live interval is being spilled, rather than creating short, non-spillable intervals for every def / use, split the interval at BB boundaries. That is, for every BB where the live interval is defined or used, create a new interval that covers all the defs and uses in the BB. This is designed to eliminate one common problem: multiple reloads of the same value in a single basic block. Note, it does *not* decrease the number of spills since no copies are inserted so the split intervals are *connected* through spill and reloads (or rematerialization). The newly created intervals can be spilled again, in that case, since it does not span multiple basic blocks, it's spilled in the usual manner. However, it can reuse the same stack slot as the previously split interval. This is currently controlled by -split-intervals-at-bb. llvm-svn: 44198
* Local spiller optimization: Evan Cheng2007-10-131-0/+4
| | | | | | | | | | | | | | | | | | | Turn this: movswl %ax, %eax movl %eax, -36(%ebp) xorl %edi, -36(%ebp) into movswl %ax, %eax xorl %edi, %eax movl %eax, -36(%ebp) by unfolding the load / store xorl into an xorl and a store when we know the value in the spill slot is available in a register. This doesn't change the number of instructions but reduce the number of times memory is accessed. Also unfold some load folding instructions and reuse the value when similar situation presents itself. llvm-svn: 42947
* Re-implement trivial rematerialization. This allows def MIs whose live ↵Evan Cheng2007-08-131-8/+21
| | | | | | intervals that are coalesced to be rematerialized. llvm-svn: 41060
* Add a missing forward declaration.David Greene2007-08-071-0/+1
| | | | llvm-svn: 40896
* More explicit keywords.Dan Gohman2007-08-021-1/+1
| | | | llvm-svn: 40757
* Re-materialize all loads from fixed stack slots.Evan Cheng2007-04-041-4/+4
| | | | llvm-svn: 35660
* First cut trivial re-materialization support.Evan Cheng2007-03-201-5/+41
| | | | llvm-svn: 35208
* rename DenseMap to IndexedMap.Chris Lattner2007-02-011-3/+3
| | | | llvm-svn: 33749
* Added an automatic cast to "std::ostream*" etc. from OStream. We then canBill Wendling2006-12-171-1/+5
| | | | | | | rework the hacks that had us passing OStream in. We pass in std::ostream* instead, check for null, and then dispatch to the correct print() method. llvm-svn: 32636
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-2/+2
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* More removal of std::cerr and DEBUG, replacing with DOUT instead.Bill Wendling2006-11-171-0/+2
| | | | llvm-svn: 31806
* Fix a long-standing wart in the code generator: two-address instruction loweringChris Lattner2006-09-051-4/+4
| | | | | | | | | | | | | | | actually *removes* one of the operands, instead of just assigning both operands the same register. This make reasoning about instructions unnecessarily complex, because you need to know if you are before or after register allocation to match up operand #'s with the target description file. Changing this also gets rid of a bunch of hacky code in various places. This patch also includes changes to fold loads into cmp/test instructions in the X86 backend, along with a significant simplification to the X86 spill folding code. llvm-svn: 30108
* Fix a latent bug that my spiller patch last week exposed: we were leavingChris Lattner2006-05-011-4/+3
| | | | | | | | | instructions in the virtregfolded map that were deleted. Because they were deleted, newly allocated instructions could end up at the same address, magically finding themselves in the map. The solution is to remove entries from the map when we delete the instructions. llvm-svn: 28041
* Remove previous patch, which wasn't quite right.Chris Lattner2006-05-011-3/+10
| | | | llvm-svn: 28039
* Local spiller kills a store if the folded restore is turned into a copy.Evan Cheng2006-04-301-2/+2
| | | | | | | | But this is incorrect if the spilled value live range extends beyond the current BB. It is currently controlled by a temporary option -spiller-check-liveout. llvm-svn: 28024
* Remove trailing whitespaceMisha Brukman2005-04-211-1/+1
| | | | llvm-svn: 21420
* When a virtual register is folded into an instruction, keep track of whetherChris Lattner2004-10-011-5/+8
| | | | | | | | it was a use, def, or both. This allows us to be less pessimistic in our analysis of them. In practice, this doesn't make a big difference, but it doesn't hurt either. llvm-svn: 16632
* Document this class a bit :-)Alkis Evlogimenos2004-10-011-0/+34
| | | | llvm-svn: 16626
* Use longer and more explicit names for instance vars (particularly importantChris Lattner2004-09-301-18/+16
| | | | | | | data structures). Fix the print method to send to the right ostream, not always cerr. Delete typedefs that are only used once. llvm-svn: 16606
* Reindent code, improve comments, move huge nested methods out of classes,Chris Lattner2004-09-301-107/+103
| | | | | | prune #includes, add print/dump methods, etc. No functionality changes. llvm-svn: 16604
* Changes For Bug 352Reid Spencer2004-09-011-1/+1
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* Add function to clear all virtual->physical mappings but not assignedAlkis Evlogimenos2004-07-201-0/+5
| | | | | | stack slots. This is in preparation for the iterative linear scan. llvm-svn: 15032
* Add method to assign stack slot to virtual register without creating aAlkis Evlogimenos2004-05-291-0/+1
| | | | | | new one. llvm-svn: 13895
OpenPOWER on IntegriCloud