- 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
-
- Feb 05, 2011
-
-
Jakob Stoklund Olesen authored
If the interference overlaps the instruction, we cannot separate it. llvm-svn: 124918
-
Jakob Stoklund Olesen authored
If these inequalities don't hold, we are creating a live range split that won't allocate. llvm-svn: 124917
-
- Feb 04, 2011
-
-
Jakob Stoklund Olesen authored
If interference reaches the last split point, it is effectively live out and should be marked as 'MustSpill'. This can make a difference when the terminator uses a register. There is no way that register can be reused in the outgoing CFG bundle, even if it isn't live out. llvm-svn: 124900
-
Jakob Stoklund Olesen authored
We should not be attempting a region split if it won't lead to at least one directly allocatable interval. That could cause infinite splitting loops. llvm-svn: 124893
-
Jakob Stoklund Olesen authored
When the live range is live through a block that doesn't use the register, but that has interference, region splitting wants to split at the top and bottom of the basic block. llvm-svn: 124839
-
- Feb 03, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 124815
-
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 20, 2011
-
-
Jakob Stoklund Olesen authored
The value mapping gets confused about which original values have multiple new definitions so they may need phi insertions. This could probably be simplified by letting enterIntvBefore() take a live range to be added following the instruction. As long as the range stays inside the same basic block, value mapping shouldn't be a problem. llvm-svn: 123926
-
Jakob Stoklund Olesen authored
interval after an instruction. The leaveIntvAfter() method only adds liveness from the instruction's boundary index to the inserted copy. Ideally, SplitKit should be smarter about this, perhaps by combining useIntv() and leaveIntvAfter() into one method that guarantees continuity. llvm-svn: 123858
-
- 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
-
- Dec 28, 2010
-
-
Duncan Sands authored
in this function, but the compiler was warning that it might be when doing a release build. llvm-svn: 122595
-
- Dec 22, 2010
-
-
Jakob Stoklund Olesen authored
pick the victim with the lowest total spill weight. llvm-svn: 122445
-
- Dec 18, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 122132
-
Nick Lewycky authored
lib/CodeGen/RegAllocGreedy.cpp:311: error: unused variable 'PhysReg' [-Wunused-variable] llvm-svn: 122122
-
Jakob Stoklund Olesen authored
createMachineVerifierPass and MachineFunction::verify. The banner is printed before the machine code dump, just like the printer pass. llvm-svn: 122113
-
Jakob Stoklund Olesen authored
RegAllocBase::VerifyEnabled. Run the machine code verifier in a few interesting places during RegAllocGreedy. llvm-svn: 122107
-
Jakob Stoklund Olesen authored
The heuristics split around the largest loop where the current register may be allocated without interference. llvm-svn: 122106
-
- Dec 16, 2010
-
-
Jakob Stoklund Olesen authored
live range splitting around loops guided by register pressure. So far, trySplit() simply prints a lot of debug output. llvm-svn: 121918
-
- Dec 15, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 121807
-
- Dec 14, 2010
-
-
Matt Beaumont-Gay authored
warning in the opt build. llvm-svn: 121791
-
Jakob Stoklund Olesen authored
llvm-svn: 121783
-