- May 23, 2013
-
-
Jakob Stoklund Olesen authored
Now that the LiveDebugVariables pass is running *after* register coalescing, the ConnectedVNInfoEqClasses class needs to deal with DBG_VALUE instructions. This only comes up when rematerialization during coalescing causes the remaining live range of a virtual register to separate into two connected components. llvm-svn: 182592
-
- Feb 21, 2013
-
-
Jakob Stoklund Olesen authored
Rewrite value numbers directly in the 'Other' LiveInterval which is moribund anyway. This avoids allocating the OtherAssignments vector. llvm-svn: 175690
-
- Feb 20, 2013
-
-
Jakob Stoklund Olesen authored
Performance is the same, but LiveRangeUpdater has a more flexible interface. llvm-svn: 175645
-
Jakob Stoklund Olesen authored
Adding new segments to large LiveIntervals can be expensive because the LiveRange objects after the insertion point may need to be moved left or right. This can cause quadratic behavior when adding a large number of segments to a live range. The LiveRangeUpdater class allows the LIveInterval to be in a temporary invalid state while segments are being added. It maintains an internal gap in the LiveInterval when it is shrinking, and it has a spill area for new segments when the LiveInterval is growing. The behavior is similar to the existing mergeIntervalRanges() function, except it allocates less memory for the spill area, and the algorithm is turned inside out so the loop is driven by the clients. llvm-svn: 175644
-
David Blaikie authored
llvm-svn: 175608
-
- Dec 03, 2012
-
-
Chandler Carruth authored
Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
-
- Nov 19, 2012
-
-
Jakob Stoklund Olesen authored
PR14376. llvm-svn: 168320
-
- Sep 27, 2012
-
-
Jakob Stoklund Olesen authored
The fix is obvious and the only test case I have is horrible, so I am not including it. The problem shows up when self-hosting clang on i386 with -new-coalescer enabled. llvm-svn: 164793
-
- Sep 12, 2012
-
-
Jakob Stoklund Olesen authored
llvm-svn: 163735
-
Manman Ren authored
"#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163339. llvm-svn: 163653
-
- Sep 06, 2012
-
-
Manman Ren authored
No functional change. llvm-svn: 163339
-
Jakob Stoklund Olesen authored
The RegisterCoalescer understands overlapping live ranges where one register is defined as a copy of the other. With this change, register allocators using LiveRegMatrix can do the same, at least for copies between physical and virtual registers. When a physreg is defined by a copy from a virtreg, allow those live ranges to overlap: %CL<def> = COPY %vreg11:sub_8bit; GR32_ABCD:%vreg11 %vreg13<def,tied1> = SAR32rCL %vreg13<tied0>, %CL<imp-use,kill> We can assign %vreg11 to %ECX, overlapping the live range of %CL. llvm-svn: 163336
-
- Aug 03, 2012
-
-
Jakob Stoklund Olesen authored
The 'unused' state of a value number can be represented as an invalid def SlotIndex. This also exposed code that shouldn't have been looking at unused value VNInfos. llvm-svn: 161258
-
Jakob Stoklund Olesen authored
The only real user of the flag was removeCopyByCommutingDef(), and it has been switched to LiveIntervals::hasPHIKill(). All the code changed by this patch was only concerned with computing and propagating the flag. llvm-svn: 161255
-
- Jul 25, 2012
-
-
Jakob Stoklund Olesen authored
When a live range splits into multiple connected components, we would arbitrarily assign <undef> uses to component 0. This is wrong when the use is tied to a def that gets assigned to a different component: %vreg69<def> = ADD8ri %vreg68<undef>, 1 The use and def must get the same virtual register. Fix this by assigning <undef> uses to the same component as the value defined by the instruction, if any: %vreg69<def> = ADD8ri %vreg69<undef>, 1 This fixes PR13402. The PR has a test case which I am not including because it is unlikely to keep exposing this behavior in the future. llvm-svn: 160739
-
- Jul 11, 2012
-
-
Chandler Carruth authored
generalizing its implementation sufficiently to support this value number scenario as well. This cuts out another significant performance hit in large functions (over 10k basic blocks, etc), especially those with "natural" CFG structures. llvm-svn: 160026
-
- Jul 10, 2012
-
-
Chandler Carruth authored
back of it. I don't have anything even remotely close to a test case for this. It only broke two build bots, both of them doing bootstrap builds, one of them a dragonegg bootstrap. It doesn't break for me when I bootstrap either. It doesn't reproduce every time or on many machines during the bootstrap. Many thanks to Duncan Sands who got the exact command (and stage of the bootstrap) which failed on the dragonegg bootstrap and managed to get it to trigger under valgrind with debug symbols. The fix was then found by inspection. llvm-svn: 159993
-
Chandler Carruth authored
quadratic behavior when performing pathological merges. Fixes the core element of PR12652. There is only one user of addRangeFrom left: join. I'm hoping to refactor further in a future patch and have join use this merge operation as well. llvm-svn: 159982
-
Chandler Carruth authored
of the trick merge routines. This adds a layer of testing that was necessary when implementing more efficient (and complex) merge logic for this datastructure. No functionality changed here. llvm-svn: 159981
-
- Jul 05, 2012
-
-
Chandler Carruth authored
vector erase. No functionality changed. llvm-svn: 159746
-
- Jun 06, 2012
-
-
Jakob Stoklund Olesen authored
Don't print out the register number and spill weight, making the TRI argument unnecessary. This allows callers to interpret the reg field. It can currently be a virtual register, a physical register, a spill slot, or a register unit. llvm-svn: 158031
-
- Jun 05, 2012
-
-
Jakob Stoklund Olesen authored
These LiveRangeCalc methods are to be used when computing a live range from scratch. llvm-svn: 158027
-
- May 19, 2012
-
-
Jakob Stoklund Olesen authored
Dead copies cause problems because they are trivial to coalesce, but removing them gived the live range a dangling end point. This patch enables full dead code elimination which trims live ranges to their uses so end points don't dangle. DCE may erase multiple instructions. Put the pointers in an ErasedInstrs set so we never risk visiting erased instructions in the work list. There isn't supposed to be any dead copies entering RegisterCoalescer, but they do slip by as evidenced by test/CodeGen/X86/coalescer-dce.ll. llvm-svn: 157101
-
- Apr 28, 2012
-
-
Jakob Stoklund Olesen authored
We don't compute spill weights until after coalescing anyway. llvm-svn: 155766
-
Jakob Stoklund Olesen authored
llvm-svn: 155765
-
- Feb 04, 2012
-
-
Jakob Stoklund Olesen authored
A live range that has an early clobber tied redef now looks like a normal tied redef, except the early clobber def uses the early clobber slot. This is enough to handle any strange interference problems. llvm-svn: 149769
-
- Feb 02, 2012
-
-
Lang Hames authored
llvm-svn: 149596
-
Lang Hames authored
more than two adjacent ranges needed to be merged. The new version should be able to handle an arbitrary sequence of adjancent ranges. llvm-svn: 149588
-
- Nov 14, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 144517
-
- Nov 13, 2011
-
-
Jakob Stoklund Olesen authored
The old naming scheme (load/use/def/store) can be traced back to an old linear scan article, but the names don't match how slots are actually used. The load and store slots are not needed after the deferred spill code insertion framework was deleted. The use and def slots don't make any sense because we are using half-open intervals as is customary in C code, but the names suggest closed intervals. In reality, these slots were used to distinguish early-clobber defs from normal defs. The new naming scheme also has 4 slots, but the names match how the slots are really used. This is a purely mechanical renaming, but some of the code makes a lot more sense now. llvm-svn: 144503
-
- Sep 15, 2011
-
-
Jakob Stoklund Olesen authored
It is conservatively correct to keep the hasPHIKill flags, even after deleting PHI-defs. The calculation can be very expensive after taildup has created a quadratic number of indirectbr edges in the CFG, and the hasPHIKill flag isn't used for anything after RenumberValues(). llvm-svn: 139780
-
- Sep 13, 2011
-
-
Jakob Stoklund Olesen authored
Three out of four clients prefer this interface which is consistent with extendIntervalEndTo() and LiveRangeCalc::extend(). llvm-svn: 139604
-
- Mar 20, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 127960
-
- Mar 17, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 127779
-
- Mar 12, 2011
-
-
Jakob Stoklund Olesen authored
There are too many compatibility problems with using mixed types in std::upper_bound, and I don't want to spend 110 lines of boilerplate setting up a call to a 10-line function. Binary search is not /that/ hard to implement correctly. I tried terminating the binary search with a linear search, but that actually made the algorithm slower against my expectation. Most live intervals have less than 4 segments. The early test against endIndex() does pay, and this version is 25% faster than plain std::upper_bound(). llvm-svn: 127522
-
- Mar 11, 2011
-
-
John Wiegley authored
The existing CompEnd predicate does not define a strict weak order as required by the C++03 standard; therefore, its use as a predicate to std::upper_bound is invalid. For a discussion of this issue, see http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270 This patch replaces the asymmetrical comparison with an iterator adaptor that achieves the same effect while being strictly standard-conforming by ensuring an apples-to-apples comparison. llvm-svn: 127462
-
- Mar 08, 2011
-
-
Jakob Stoklund Olesen authored
Patch by Olaf Krzikalla! llvm-svn: 127264
-
Oscar Fuentes authored
MSVC 9." The "fix" was meaningless. This reverts commit r127245. llvm-svn: 127260
-
Oscar Fuentes authored
llvm-svn: 127245
-
- Mar 03, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 126922
-