- Apr 20, 2011
-
-
Jakob Stoklund Olesen authored
On the x86-64 and thumb2 targets, some registers are more expensive to encode than others in the same register class. Add a CostPerUse field to the TableGen register description, and make it available from TRI->getCostPerUse. This represents the cost of a REX prefix or a 32-bit instruction encoding required by choosing a high register. Teach the greedy register allocator to prefer cheap registers for busy live ranges (as indicated by spill weight). llvm-svn: 129864
-
- Apr 13, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 129442
-
- Apr 12, 2011
-
-
Jakob Stoklund Olesen authored
Use a Bitvector instead, we didn't need the smaller memory footprint anyway. This makes the greedy register allocator 10% faster. llvm-svn: 129390
-
Jakob Stoklund Olesen authored
This merges the behavior of splitSingleBlocks into splitAroundRegion, so the RS_Region and RS_Block register stages can be coalesced. That means the leftover intervals after region splitting go directly to spilling instead of a second pass of per-block splitting. llvm-svn: 129379
-
- Apr 11, 2011
-
-
Jakob Stoklund Olesen authored
weight limit has been exceeded. llvm-svn: 129305
-
- Apr 09, 2011
-
-
Jakob Stoklund Olesen authored
It is common for large live ranges to have few basic blocks with register uses and many live-through blocks without any uses. This approach grows the Hopfield network incrementally around the use blocks, completely avoiding checking interference for some through blocks. llvm-svn: 129188
-
- Apr 07, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 129079
-
- Apr 06, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 129030
-
Jakob Stoklund Olesen authored
Without any positive bias, there is nothing for the spill placer to to. It will spill everywhere. llvm-svn: 129029
-
Jakob Stoklund Olesen authored
If there are no positive nodes, the algorithm can be aborted early. llvm-svn: 129021
-
Jakob Stoklund Olesen authored
This will allow us to abort the algorithm early if it is determined to be futile. llvm-svn: 129020
-
Jakob Stoklund Olesen authored
llvm-svn: 128986
-
Jakob Stoklund Olesen authored
About 90% of the relevant blocks are live-through without uses, and the only information required about them is their number. This saves memory and enables later optimizations that need to look at only the use-blocks. llvm-svn: 128985
-
- Apr 05, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 128935
-
Jakob Stoklund Olesen authored
llvm-svn: 128875
-
- Apr 04, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 128821
-
- Apr 02, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 128765
-
Jakob Stoklund Olesen authored
When the greedy register allocator is splitting multiple global live ranges, it tends to look at the same interference data many times. The InterferenceCache class caches queries for unaltered LiveIntervalUnions. llvm-svn: 128764
-
- Mar 30, 2011
-
-
Jakob Stoklund Olesen authored
When DCE clones a live range because it separates into connected components, make sure that the clones enter the same register allocator stage as the register they were cloned from. For instance, clones may be split even when they where created during spilling. Other registers created during spilling are not candidates for splitting or even (re-)spilling. llvm-svn: 128524
-
- Mar 29, 2011
-
-
Jakob Stoklund Olesen authored
The spill weight is not recomputed for an unspillable register - it stays infinite. llvm-svn: 128490
-
- 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
-