#
50215afd |
| 10-May-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Fix PR9883. Make sure all caches are invalidated when a live range is repaired.
The previous invalidation missed the alias interference caches.
Also add a stats counter for the number of repaired r
Fix PR9883. Make sure all caches are invalidated when a live range is repaired.
The previous invalidation missed the alias interference caches.
Also add a stats counter for the number of repaired ranges.
llvm-svn: 131133
show more ...
|
#
c5a8c08d |
| 05-May-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Add some statistics to the splitting and spilling frameworks.
llvm-svn: 130931
|
#
eaa6ed1a |
| 03-May-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Gracefully handle invalid live ranges. Fix PR9831.
Register coalescing can sometimes create live ranges that end in the middle of a basic block without any killing instruction. When SplitKit detects
Gracefully handle invalid live ranges. Fix PR9831.
Register coalescing can sometimes create live ranges that end in the middle of a basic block without any killing instruction. When SplitKit detects this, it will repair the live range by shrinking it to its uses.
Live range splitting also needs to know about this. When the range shrinks so much that it becomes allocatable, live range splitting fails because it can't find a good split point. It is paranoid about making progress, so an allocatable range is considered an error.
The coalescer should really not be creating these bad live ranges. They appear when coalescing dead copies.
llvm-svn: 130787
show more ...
|
#
7d406793 |
| 02-May-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Minimize the slot indexes spanned by register ranges created when splitting.
When an interfering live range ends at a dead slot index between two instructions, make sure that the inserted copy instr
Minimize the slot indexes spanned by register ranges created when splitting.
When an interfering live range ends at a dead slot index between two instructions, make sure that the inserted copy instruction gets a slot index after the dead ones. This makes it possible to avoid the interference.
Ideally, there shouldn't be interference ending at a deleted instruction, but physical register coalescing can sometimes do that to sub-registers.
This fixes PR9823.
llvm-svn: 130687
show more ...
|
#
eef23273 |
| 26-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Add a safe-guard against repeated splitting for some rare cases.
The number of blocks covered by a live range must be strictly decreasing when splitting, otherwise we can't allow repeated splitting.
Add a safe-guard against repeated splitting for some rare cases.
The number of blocks covered by a live range must be strictly decreasing when splitting, otherwise we can't allow repeated splitting.
llvm-svn: 130249
show more ...
|
#
70597d4e |
| 21-Apr-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Don't recycle loop variables.
llvm-svn: 129928
|
#
6a663b8d |
| 21-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Allow allocatable ranges from global live range splitting to be split again.
These intervals are allocatable immediately after splitting, but they may be evicted because of later splitting. This is
Allow allocatable ranges from global live range splitting to be split again.
These intervals are allocatable immediately after splitting, but they may be evicted because of later splitting. This is rare, but when it happens they should be split again.
The remainder intervals that cannot be allocated after splitting still move directly to spilling.
SplitEditor::finish can optionally provide a mapping from new live intervals back to the original interval indexes returned by openIntv().
Each original interval index can map to multiple new intervals after connected components have been separated. Dead code elimination may also add existing intervals to the list.
The reverse mapping allows the SplitEditor client to treat the new intervals differently depending on the split region they came from.
llvm-svn: 129925
show more ...
|
#
beb17d93 |
| 16-Apr-2011 |
Francois Pichet <pichet2000@gmail.com> |
Unbreak the MSVC 2010 build. For further information on this particular issue see: http://connect.microsoft.com/VisualStudio/feedback/details/520043/error-converting-from-null-to-a-pointer-type-in-st
Unbreak the MSVC 2010 build. For further information on this particular issue see: http://connect.microsoft.com/VisualStudio/feedback/details/520043/error-converting-from-null-to-a-pointer-type-in-std-pair
llvm-svn: 129642
show more ...
|
#
1af8b4dc |
| 15-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Teach the SplitKit blitter to handle multiply defined values as well.
The transferValues() function can now handle both singly and multiply defined values, as long as the resulting live range is kno
Teach the SplitKit blitter to handle multiply defined values as well.
The transferValues() function can now handle both singly and multiply defined values, as long as the resulting live range is known. Only rematerialized values have their live range recomputed by extendRange().
The updateSSA() function can now insert PHI values in bulk across multiple values in multiple target registers in one pass. The list of blocks received from transferValues() is in layout order which seems to work well for the iterative algorithm. Blocks from extendRange() are still in reverse BFS order, but this function is used so rarely now that it doesn't matter.
llvm-svn: 129580
show more ...
|
#
cda53feb |
| 13-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Stop using dead function.
llvm-svn: 129442
|
#
c70b697a |
| 12-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Create new intervals for isolated blocks during region splitting.
This merges the behavior of splitSingleBlocks into splitAroundRegion, so the RS_Region and RS_Block register stages can be coalesced
Create new intervals for isolated blocks during region splitting.
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
show more ...
|
#
0840f50b |
| 12-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Add SplitKit API to query and select the current interval being worked on.
This makes it possible to target multiple registers in one pass.
llvm-svn: 129374
|
#
ed47ed4e |
| 09-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Build the Hopfield network incrementally when splitting global live ranges.
It is common for large live ranges to have few basic blocks with register uses and many live-through blocks without any us
Build the Hopfield network incrementally when splitting global live ranges.
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
show more ...
|
Revision tags: llvmorg-2.9.0 |
|
#
bf91c4e8 |
| 06-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Analyze blocks with uses separately from live-through blocks without uses.
About 90% of the relevant blocks are live-through without uses, and the only information required about them is their numbe
Analyze blocks with uses separately from live-through blocks without uses.
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
show more ...
|
#
858afbb6 |
| 05-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Sign error
llvm-svn: 128963
|
#
5c482cd3 |
| 05-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Don't crash when a value is defined after the last split point.
llvm-svn: 128962
|
#
fe6e07fd |
| 05-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Use std::unique instead of a SmallPtrSet to ensure unique instructions in UseSlots.
This allows us to always keep the smaller slot for an instruction which is what we want when a register has early
Use std::unique instead of a SmallPtrSet to ensure unique instructions in UseSlots.
This allows us to always keep the smaller slot for an instruction which is what we want when a register has early clobber defines.
Drop the UsingInstrs set and the UsingBlocks map. They are no longer needed.
llvm-svn: 128886
show more ...
|
#
d93b0e3c |
| 05-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Stop precomputing last split points, query the SplitAnalysis cache on demand.
llvm-svn: 128875
|
#
50b2db8a |
| 05-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Cache the fairly expensive last split point computation and provide a fast inlined path for the common case.
Most basic blocks don't contain a call that may throw, so the last split point os simply
Cache the fairly expensive last split point computation and provide a fast inlined path for the common case.
Most basic blocks don't contain a call that may throw, so the last split point os simply the first terminator.
llvm-svn: 128874
show more ...
|
#
8933907b |
| 04-Apr-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Stop caching basic block index ranges now that SlotIndexes can keep up.
llvm-svn: 128821
|
#
e991f728 |
| 29-Mar-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Recompute register class and hint for registers created during spilling.
The spill weight is not recomputed for an unspillable register - it stays infinite.
llvm-svn: 128490
|
#
12877b8a |
| 29-Mar-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Handle the special case when all uses follow the last split point.
llvm-svn: 128450
|
#
bd6b86e4 |
| 27-Mar-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Amend debug output.
llvm-svn: 128398
|
Revision tags: llvmorg-2.9.0-rc3, llvmorg-2.9.0-rc2 |
|
#
35502423 |
| 20-Mar-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Process all dead defs after rematerializing during splitting.
llvm-svn: 127973
|
#
c099dde9 |
| 18-Mar-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Be more accurate about the slot index reading a register when dealing with defs and early clobbers.
Assert when trying to find an undefined value.
llvm-svn: 127856
|