summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SplitKit.h
Commit message (Collapse)AuthorAgeFilesLines
* Thinking about it, we don't need MachineDominatorTree after all. The DomValueJakob Stoklund Olesen2010-08-181-4/+1
| | | | | | map discovers the iterated dominance frontier for free. llvm-svn: 111400
* Add the LiveIntervalMap class. Don't hook it up yet.Jakob Stoklund Olesen2010-08-181-0/+66
| | | | | | | | | | | | | | | | LiveIntervalMap maps values from a parent LiveInterval to a child interval that is a strict subset. It will create phi-def values as needed to preserve the VNInfo SSA form in the child interval. This leads to an algorithm very similar to the one in SSAUpdaterImpl.h, but with enough differences that the code can't be reused: - We don't need to manipulate PHI instructions. - LiveIntervals have kills. - We have MachineDominatorTree. - We can use df_iterator. llvm-svn: 111393
* Clean up the Spiller.h interface.Jakob Stoklund Olesen2010-08-131-2/+2
| | | | | | | | | 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-1/+11
| | | | | | | | 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
* Update the SplitAnalysis statistics as uses are moved from curli to the newJakob Stoklund Olesen2010-08-121-3/+7
| | | | | | | split intervals. THis means the analysis can be used for multiple splits as long as curli doesn't shrink. llvm-svn: 110975
* Implement single block splitting.Jakob Stoklund Olesen2010-08-121-5/+21
| | | | | | | | | | 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
* Recalculate the spill weight and allocation hint for virtual registers createdJakob Stoklund Olesen2010-08-101-0/+2
| | | | | | during live range splitting. llvm-svn: 110686
* Lazily defer duplicating the live interval we are splitting until we know it isJakob Stoklund Olesen2010-08-061-14/+21
| | | | | | | | | | 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
* Checkpoint SplitKit progress.Jakob Stoklund Olesen2010-08-041-29/+46
| | | | | | | 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-6/+88
| | | | | | | | 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-2/+2
| | | | | | | | The spillers can pluck the analyses they need from the pass reference. Switch some never-null pointers to references. llvm-svn: 108969
* Implement loop splitting analysis.Jakob Stoklund Olesen2010-07-201-1/+35
| | | | | | | Determine which loop exit blocks need a 'pre-exit' block inserted. Recognize when this would be impossible. llvm-svn: 108941
* Appease the colonials.Jakob Stoklund Olesen2010-07-201-1/+1
| | | | llvm-svn: 108845
* Beginning SplitKit - utility classes for live range splitting.Jakob Stoklund Olesen2010-07-201-0/+86
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
OpenPOWER on IntegriCloud