- Mar 28, 2011
-
-
Jakob Stoklund Olesen authored
The reassignment phase was able to move interference with a higher spill weight, but it didn't happen very often and it was fairly expensive. The existing interference eviction picks up the slack. llvm-svn: 128397
-
- Mar 20, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 127959
-
- Mar 16, 2011
-
-
Jakob Stoklund Olesen authored
The register allocator needs to adjust its live interval unions when that happens. llvm-svn: 127774
-
Jakob Stoklund Olesen authored
llvm-svn: 127771
-
- Mar 13, 2011
-
-
Jakob Stoklund Olesen authored
This allows the allocator to free any resources used by the virtual register, including physical register assignments. llvm-svn: 127560
-
- Mar 10, 2011
-
-
Jakob Stoklund Olesen authored
This makes it possible to register delegates and get callbacks when the spiller edits live ranges. llvm-svn: 127389
-
Jakob Stoklund Olesen authored
llvm-svn: 127388
-
- Mar 09, 2011
-
-
Jakob Stoklund Olesen authored
This will we used for keeping register allocator data structures up to date while LiveRangeEdit is trimming live intervals. llvm-svn: 127300
-
- Mar 07, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 127181
-
- Mar 05, 2011
-
-
Jakob Stoklund Olesen authored
The global cost is the sum of block frequencies for spill code that must be inserted because preferences weren't met. llvm-svn: 127062
-
Jakob Stoklund Olesen authored
This simplifies the code and makes it faster too. The interference patterns are saved for each candidate register. It will be reused for actually executing the split. Work in progress. llvm-svn: 127054
-
- Mar 04, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 127040
-
Jakob Stoklund Olesen authored
It gives better results. Sometimes, a live range can be large and still have high spill weight. Such a range should not be spilled. llvm-svn: 127036
-
Jakob Stoklund Olesen authored
llvm-svn: 127006
-
Jakob Stoklund Olesen authored
llvm-svn: 126975
-
- Mar 03, 2011
-
-
Jakob Stoklund Olesen authored
This speeds up the greedy register allocator by 15%. DenseMap is not as fast as one might hope. llvm-svn: 126921
-
Jakob Stoklund Olesen authored
llvm-svn: 126912
-
- Mar 02, 2011
-
-
Jakob Stoklund Olesen authored
This is a waste of time since we already know how to evict all interferences which is a better approach anyway. llvm-svn: 126798
-
- Mar 01, 2011
-
-
Jakob Stoklund Olesen authored
This effectively disables the 'turbo' functionality of the greedy register allocator where all new live ranges created by splitting would be reconsidered as if they were originals. There are two reasons for doing this, 1. It guarantees that the algorithm terminates. Early versions were prone to infinite looping in certain corner cases. 2. It is a 2x speedup. We can skip a lot of unnecessary interference checks that won't lead to good splitting anyway. The problem is that region splitting only gets one shot, so it should probably be changed to target multiple physical registers at once. Local live range splitting is still 'turbo' enabled. It only accounts for a small fraction of compile time, so it is probably not necessary to do anything about that. llvm-svn: 126781
-
- Feb 25, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 126463
-
Jakob Stoklund Olesen authored
New live ranges are assigned in long -> short order, but live ranges that have been evicted at least once are deferred and assigned in short -> long order. Also disable splitting and spilling for live ranges seen for the first time. The intention is to create a realistic interference pattern from the heavy live ranges before starting splitting and spilling around it. llvm-svn: 126451
-
- Feb 23, 2011
-
-
Jakob Stoklund Olesen authored
When a large live range is evicted, it will usually be split when it comes around again. By deferring evicted live ranges, the splitting happens at a time when the interference pattern is more realistic. This prevents repeated splitting and evictions. llvm-svn: 126282
-
Jakob Stoklund Olesen authored
llvm-svn: 126277
-
Jakob Stoklund Olesen authored
Use interval sizes instead of spill weights to determine if it is legal to evict interference. A smaller interval can evict interference if all interfering live ranges are larger. Allow multiple interferences to be evicted as along as they are all larger than the live range being allocated. Spill weights are still used to select the preferred eviction candidate. llvm-svn: 126276
-
Jakob Stoklund Olesen authored
This is based on the observation that long live ranges are more difficult to allocate, so there is a better chance of solving the puzzle by handling the big pieces first. The allocator will evict and split long alive ranges when they get in the way. RABasic is still using spill weights for its priority queue, so the interface to the queue has been virtualized. llvm-svn: 126259
-
- Feb 22, 2011
-
-
Jakob Stoklund Olesen authored
An original endpoint is an instruction that killed or defined the original live range before any live ranges were split. When splitting global live ranges, avoid creating local live ranges without any original endpoints. We may still create global live ranges without original endpoints, but such a range won't be split again, and live range splitting still terminates. llvm-svn: 126151
-
- Feb 19, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 126005
-
Jakob Stoklund Olesen authored
llvm-svn: 126001
-
- Feb 18, 2011
-
-
Jakob Stoklund Olesen authored
The rewriter works almost identically to -rewriter=trivial, except it also eliminates any identity copies. This makes the new register allocators independent of VirtRegRewriter.cpp which will be going away at the same time as RegAllocLinearScan. llvm-svn: 125967
-
- Feb 17, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 125789
-
Jakob Stoklund Olesen authored
A local live range is live in a single basic block. If such a range fails to allocate, try to find a sub-range that would get a larger spill weight than its interference. llvm-svn: 125764
-
- Feb 10, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 125238
-
- Feb 09, 2011
-
-
Jakob Stoklund Olesen authored
No functional changes intended. llvm-svn: 125231
-
Jakob Stoklund Olesen authored
Registers are not allocated strictly in spill weight order when live range splitting and spilling has created new shorter intervals with higher spill weights. When one of the new heavy intervals conflicts with a single lighter interval, simply evict the old interval instead of trying to split the heavy one. The lighter interval is a better candidate for splitting, it has a smaller use density. llvm-svn: 125151
-
Jakob Stoklund Olesen authored
llvm-svn: 125137
-
Jakob Stoklund Olesen authored
The last split point can be anywhere in the block, so it interferes with the strictly monotonic requirements of advanceTo(). llvm-svn: 125132
-
- Feb 08, 2011
-
-
Jakob Stoklund Olesen authored
instruction in a basic block. llvm-svn: 125116
-
Jakob Stoklund Olesen authored
This is a lot easier than trying to get kill flags right during live range splitting and rematerialization. llvm-svn: 125113
-
Jakob Stoklund Olesen authored
llvm-svn: 125109
-
Jakob Stoklund Olesen authored
If a live range is used by a terminator instruction, and that live range needs to leave the block on the stack or in a different register, it can be necessary to have both sides of the split live at the terminator instruction. Example: %vreg2 = COPY %vreg1 JMP %vreg1 Becomes after spilling %vreg2: SPILL %vreg1 JMP %vreg1 The spill doesn't kill the register as is normally the case. llvm-svn: 125102
-