- Feb 04, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 124842
-
- Feb 03, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 124813
-
Jakob Stoklund Olesen authored
If the found value is not live-through the block, we should only add liveness up to the requested slot index. When the value is live-through, the whole block should be colored. Bug found by SSA verification in the machine code verifier. llvm-svn: 124812
-
Jakob Stoklund Olesen authored
These end points come from the inserted copies, and can be passed directly to useIntv. This simplifies the coloring code. llvm-svn: 124799
-
Eric Christopher authored
llvm-svn: 124779
-
Eric Christopher authored
llvm-svn: 124778
-
Jakob Stoklund Olesen authored
The greedy register allocator revealed some problems with the value mapping in SplitKit. We would sometimes start mapping values before all defs were known, and that could change a value from a simple 1-1 mapping to a multi-def mapping that requires ssa update. The new approach collects all defs and register assignments first without filling in any live intervals. Only when finish() is called, do we compute liveness and mapped values. At this time we know with certainty which values map to multiple values in a split range. This also has the advantage that we can compute live ranges based on the remaining uses after rematerializing at split points. The current implementation has many opportunities for compile time optimization. llvm-svn: 124765
-
- Jan 26, 2011
-
-
Jakob Stoklund Olesen authored
No functional change. llvm-svn: 124257
-
- Jan 20, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 123925
-
- Jan 19, 2011
-
-
Jakob Stoklund Olesen authored
Region splitting includes loop splitting as a subset, and it is more generic. The splitting heuristics for variables that are live in more than one block are now: 1. Try to create a region that covers multiple basic blocks. 2. Try to create a new live range for each block with multiple uses. 3. Spill. Steps 2 and 3 are similar to what the standard spiller is doing. llvm-svn: 123853
-
- Jan 18, 2011
-
-
Jakob Stoklund Olesen authored
Analyze the live range's behavior entering and leaving basic blocks. Compute an interference pattern for each allocation candidate, and use SpillPlacement to find an optimal region where that register can be live. This code is still not enabled. llvm-svn: 123774
-
- Jan 04, 2011
-
-
Jakob Stoklund Olesen authored
The analysis will be needed by both the greedy register allocator and the X86FloatingPoint pass. It only needs to be computed once when the CFG doesn't change. This pass is very fast, usually showing up as 0.0% wall time. llvm-svn: 122832
-
- Dec 22, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 122444
-
- Dec 21, 2010
-
-
Jakob Stoklund Olesen authored
Edge bundles is an annotation on the CFG that turns it into a bipartite directed graph where each basic block is connected to an outgoing and an ingoing bundle. These bundles are useful for identifying regions of the CFG for live range splitting. llvm-svn: 122301
-
- Dec 18, 2010
-
-
Jakob Stoklund Olesen authored
the loop predecessors. The register can be live-out from a predecessor without being live-in to the loop header if there is a critical edge from the predecessor. llvm-svn: 122123
-
- Dec 15, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 121872
-
Jakob Stoklund Olesen authored
Bypass loops have the current live range live through, but contain no uses or defs. Splitting around a bypass loop can free registers for other uses inside the loop by spilling the split range. llvm-svn: 121871
-
Jakob Stoklund Olesen authored
This method returns the set of loops with uses that are candidates for splitting. llvm-svn: 121870
-
- Nov 11, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 118742
-
- Nov 10, 2010
-
-
Jakob Stoklund Olesen authored
Whenever splitting wants to insert a copy, it checks if the value can be rematerialized cheaply instead. Missing features: - Delete instructions when all uses have been rematerialized. - Truncate live ranges to the remaining uses after rematerialization. llvm-svn: 118702
-
- Nov 03, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 118193
-
- Nov 02, 2010
-
-
Jakob Stoklund Olesen authored
source, and let rewrite() clean it up. This way, kill flags on the inserted copies are fixed as well during rewrite(). We can't just assume that all the copies we insert are going to be kills since critical edges into loop headers sometimes require both source and dest to be live out of a block. llvm-svn: 117980
-
- Nov 01, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 117959
-
- Oct 30, 2010
-
-
Jakob Stoklund Olesen authored
a basic block. llvm-svn: 117764
-
- Oct 29, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 117673
-
Benjamin Kramer authored
llvm-svn: 117671
-
Jakob Stoklund Olesen authored
llvm-svn: 117669
-
- Oct 28, 2010
-
-
Jakob Stoklund Olesen authored
in SSAUpdaterImpl.h Verifying live intervals revealed that the old method was completely wrong, and we need an iterative approach to calculating PHI placemant. Fortunately, we have MachineDominators available, so we don't have to compute that over and over like SSAUpdaterImpl.h must. Live-out values are cached between calls to mapValue() and computed in a greedy way, so most calls will be working with very small block sets. Thanks to Bob for explaining how this should work. llvm-svn: 117599
-
Jakob Stoklund Olesen authored
proper SSA updating. This doesn't cause MachineDominators to be recomputed since we are already requiring MachineLoopInfo which uses dominators as well. llvm-svn: 117598
-
- Oct 27, 2010
-
-
Jakob Stoklund Olesen authored
live out. This doesn't prevent us from inserting a loop preheader later on, if that is better. llvm-svn: 117424
-
Jakob Stoklund Olesen authored
Critical edges going into a loop are not as bad as critical exits. We can handle them by splitting the critical edge, or by having both inside and outside registers live out of the predecessor. llvm-svn: 117423
-
Jakob Stoklund Olesen authored
the remainder register. Example: bb0: x = 1 bb1: use(x) ... x = 2 jump bb1 When x is isolated in bb1, the inner part breaks into two components, x1 and x2: bb0: x0 = 1 bb1: x1 = x0 use(x1) ... x2 = 2 x0 = x2 jump bb1 llvm-svn: 117408
-
Jakob Stoklund Olesen authored
necessary to get correct hasPHIKill flags. llvm-svn: 117406
-
Jakob Stoklund Olesen authored
llvm-svn: 117405
-
- Oct 23, 2010
-
-
Jakob Stoklund Olesen authored
When a block has exactly two uses and the register is both live-in and live-out, don't isolate the block. We would be inserting two copies, so we haven't really made any progress. If the live-in and live-out values separate into disconnected components after splitting, we would be making progress. We can't detect that for now. llvm-svn: 117169
-
- Oct 22, 2010
-
-
Jakob Stoklund Olesen authored
An exit block with a critical edge must only have predecessors in the loop, or just before the loop. This guarantees that the inserted copies in the loop predecessors dominate the exit block. llvm-svn: 117144
-
Jakob Stoklund Olesen authored
llvm-svn: 117143
-
- Oct 21, 2010
-
-
Jakob Stoklund Olesen authored
Parent - union(Y, ...). Doh. llvm-svn: 117042
-
- Oct 15, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 116547
-
Jakob Stoklund Olesen authored
All registers created during splitting or spilling are assigned to the same stack slot as the parent register. When splitting or rematting, we may not spill at all. In that case the stack slot is still assigned, but it will be dead. llvm-svn: 116546
-