summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/InlineSpiller.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Removed VNInfo::isDefAccurate(). Def "accuracy" can be checked by testing ↵Lang Hames2010-09-251-7/+5
| | | | | | whether LiveIntervals::getInstructionFromIndex(def) returns NULL. llvm-svn: 114791
* Clean up the Spiller.h interface.Jakob Stoklund Olesen2010-08-131-7/+5
| | | | | | | | | The earliestStart argument is entirely specific to linear scan allocation, and can be easily calculated by RegAllocLinearScan. Replace std::vector with SmallVector. llvm-svn: 111055
* Implement splitting inside a single block.Jakob Stoklund Olesen2010-08-131-4/+9
| | | | | | | | When a live range is contained a single block, we can split it around instruction clusters. The current approach is very primitive, splitting before and after the largest gap between uses. llvm-svn: 111043
* Implement single block splitting.Jakob Stoklund Olesen2010-08-121-0/+9
| | | | | | | | | | Before spilling a live range, we split it into a separate range for each basic block where it is used. That way we only get one reload per basic block if the new smaller ranges can allocate to a register. This type of splitting is already present in the standard spiller. llvm-svn: 110934
* Avoid editing the current live interval during remat.Jakob Stoklund Olesen2010-08-101-3/+3
| | | | | | | | The live interval may be used for a spill slot as well, and that spill slot could be shared by split registers. We cannot shrink it, even if we know the current register won't need the spill slot in that range. llvm-svn: 110721
* Lazily defer duplicating the live interval we are splitting until we know it isJakob Stoklund Olesen2010-08-061-3/+4
| | | | | | | | | | necessary. Sometimes, live range splitting doesn't shrink the current interval, but simply changes some instructions to use a new interval. That makes the original more suitable for spilling. In this case, we don't need to duplicate the original. llvm-svn: 110481
* Keep the MachiuneFunctionPass pointer around. It is useful for verification.Jakob Stoklund Olesen2010-08-061-1/+3
| | | | llvm-svn: 110464
* Coalesce stack slot accesses that arise when spilling both sides of a COPY.Jakob Stoklund Olesen2010-08-041-0/+23
| | | | | | | | | This helps avoid silly code: %R0<def = LOAD <fi#5> STORE <fi#5>, %R0<kill> llvm-svn: 110266
* Checkpoint SplitKit progress.Jakob Stoklund Olesen2010-08-041-2/+5
| | | | | | | We are now at a point where we can split around simple single-entry, single-exit loops, although still with some bugs. llvm-svn: 110257
* Add SplitEditor to SplitKit. This class will be used to edit live intervals andJakob Stoklund Olesen2010-07-261-2/+2
| | | | | | | | rewrite instructions for live range splitting. Still work in progress. llvm-svn: 109469
* Change the createSpiller interface to take a MachineFunctionPass argument.Jakob Stoklund Olesen2010-07-201-13/+16
| | | | | | | | The spillers can pluck the analyses they need from the pass reference. Switch some never-null pointers to references. llvm-svn: 108969
* Beginning SplitKit - utility classes for live range splitting.Jakob Stoklund Olesen2010-07-201-1/+26
| | | | | | | | | This is a work in progress. So far we have some basic loop analysis to help determine where it is useful to split a live range around a loop. The actual loop splitting code from Splitter.cpp is also going to move in here. llvm-svn: 108842
* Spillers may alter MachineLoopInfo when breaking critical edges, so make itJakob Stoklund Olesen2010-07-191-4/+7
| | | | | | non-const. llvm-svn: 108734
* Change TII::foldMemoryOperand API to require the machine instruction to beJakob Stoklund Olesen2010-07-091-3/+2
| | | | | | | | | | | | | | inserted in a MBB, and return an already inserted MI. This target API change is necessary to allow foldMemoryOperand to call storeToStackSlot and loadFromStackSlot when folding a COPY to a stack slot reference in a target independent way. The foldMemoryOperandImpl hook is going to change in the same way, but I'll wait until COPY folding is actually implemented. Most targets only fold copies and won't need to specialize this hook at all. llvm-svn: 107991
* Remove invalid assertJakob Stoklund Olesen2010-07-021-1/+0
| | | | llvm-svn: 107505
* Properly handle debug values during inline spilling.Jakob Stoklund Olesen2010-07-021-13/+32
| | | | llvm-svn: 107503
* Rematerialize as much as possible before inserting spills and reloads.Jakob Stoklund Olesen2010-07-021-60/+179
| | | | | | | | | | This allows us to recognize the common case where all uses could be rematerialized, and no stack slot allocation is necessary. If some values could be fully rematerialized, remove them from the live range before allocating a stack slot for the rest. llvm-svn: 107492
* Add memory operand folding support to InlineSpiller.Jakob Stoklund Olesen2010-07-011-0/+37
| | | | llvm-svn: 107355
* Add support for rematerialization to InlineSpiller.Jakob Stoklund Olesen2010-06-301-31/+128
| | | | llvm-svn: 107351
* Remember to track spill slot uses in VirtRegMap when inserting loads and stores.Jakob Stoklund Olesen2010-06-301-0/+2
| | | | | | | | | LocalRewriter::runOnMachineFunction uses this information to mark dead spill slots. This means that InlineSpiller now also works for functions that spill. llvm-svn: 107302
* Begin implementation of an inline spiller.Jakob Stoklund Olesen2010-06-291-0/+136
InlineSpiller inserts loads and spills immediately instead of deferring to VirtRegMap. This is possible now because SlotIndexes allows instructions to be inserted and renumbered. This is work in progress, and is mostly a copy of TrivialSpiller so far. It works very well for functions that don't require spilling. llvm-svn: 107227
OpenPOWER on IntegriCloud