- 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
-
- Mar 02, 2011
-
-
Jakob Stoklund Olesen authored
This method could probably be used by LiveIntervalAnalysis::shrinkToUses, and now it can use extendIntervalEndTo() which coalesces ranges. llvm-svn: 126803
-
- 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 09, 2011
-
-
Jakob Stoklund Olesen authored
physical register numbers. This makes the hack used in LiveInterval official, and lets LiveInterval be oblivious of stack slots. The isPhysicalRegister() and isVirtualRegister() predicates don't know about this, so when a variable may contain a stack slot, isStackSlot() should always be tested first. llvm-svn: 123128
-
Jakob Stoklund Olesen authored
Print virtual registers numbered from 0 instead of the arbitrary FirstVirtualRegister. The first virtual register is printed as %vreg0. TRI::NoRegister is printed as %noreg. llvm-svn: 123107
-
- Dec 21, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 122296
-
- Dec 19, 2010
-
-
Cameron Zwarich authored
ConnectedVNInfoEqClasses::Classify(). llvm-svn: 122202
-
- Oct 29, 2010
-
-
Jakob Stoklund Olesen authored
We don't want unused values forming their own equivalence classes, so we lump them all together in one class, and then merge them with the class of the last used value. llvm-svn: 117670
-
Jakob Stoklund Olesen authored
EquvivalenceClasses.h except it looks like overkill when elements are continuous integers. llvm-svn: 117631
-
- Oct 09, 2010
-
-
Benjamin Kramer authored
llvm-svn: 116156
-
- Oct 08, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 116105
-
Jakob Stoklund Olesen authored
connected components. These components should be allocated different virtual registers because there is no reason for them to be allocated together. Add the ConnectedVNInfoEqClasses class to calculate the connected components, and move values to new LiveIntervals. Use it from SplitKit::rewrite by creating new virtual registers for the components. llvm-svn: 116006
-
- Oct 05, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 115650
-
Jakob Stoklund Olesen authored
llvm-svn: 115649
-
- Oct 02, 2010
-
-
Jakob Stoklund Olesen authored
LiveInterval::MergeValueNumberInto instead of trying to extend LiveRanges and getting it wrong. This fixed PR8249 where a valno with a multi-segment live range was defined by an identity copy created by RemoveCopyByCommutingDef. Some of the live segments disappeared. llvm-svn: 115385
-
- Sep 25, 2010
-
-
Lang Hames authored
Removed VNInfo::isDefAccurate(). Def "accuracy" can be checked by testing whether LiveIntervals::getInstructionFromIndex(def) returns NULL. llvm-svn: 114791
-
- Sep 21, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 114469
-
Jakob Stoklund Olesen authored
llvm-svn: 114459
-
Jakob Stoklund Olesen authored
llvm-svn: 114455
-
Jakob Stoklund Olesen authored
instead of calling lower_bound or upper_bound directly. This cleans up the search logic a bit because {lower,upper}_bound compare LR->start by default, and it is usually simpler to search LR->end. Funnelling all searches through one function also makes it possible to replace the search algorithm with something faster than binary search. llvm-svn: 114448
-
Jakob Stoklund Olesen authored
llvm-svn: 114447
-
- Sep 08, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 113386
-
- Sep 04, 2010
-
-
Jakob Stoklund Olesen authored
Clobber ranges are no longer used when joining physical registers. Instead, all aliases are checked for interference. llvm-svn: 113084
-
- Aug 12, 2010
-
-
Jakob Stoklund Olesen authored
If a phi-def value were removed from the interval, the phi-kill flags are no longer valid. llvm-svn: 110949
-
Jakob Stoklund Olesen authored
llvm-svn: 110944
-
- Aug 10, 2010
-
-
Jakob Stoklund Olesen authored
register at a time. This turns out to be slightly faster than iterating over instructions, but more importantly, it allows us to compute spill weights for new registers created after the spill weight pass has run. Also compute the allocation hint at the same time as the spill weight. This allows us to use the spill weight as a cost metric for copies, and choose the most profitable hint if there is more than one possibility. The new hints provide a very small (< 0.1%) but universal code size improvement. llvm-svn: 110631
-
- Aug 06, 2010
-
-
Jakob Stoklund Olesen authored
After heavy editing of a live interval, it is much easier to simply renumber the live values instead of trying to keep track of the unused ones. llvm-svn: 110463
-
- Aug 02, 2010
-
-
Oscar Fuentes authored
Fixes potential ambiguity problems on VS 2010. Patch by nobled! llvm-svn: 110029
-
- Jul 26, 2010
-
-
Lang Hames authored
llvm-svn: 109388
-
- Jul 13, 2010
-
-
Jakob Stoklund Olesen authored
llvm-svn: 108277
-
Jakob Stoklund Olesen authored
LiveInterval::overlapsFrom dereferences end() if it is called on an empty interval. It would be reasonable to just return false - an empty interval doesn't overlap anything, but I want to know who is doing it first. llvm-svn: 108264
-
Jakob Stoklund Olesen authored
Also, one binary search is enough. llvm-svn: 108261
-
- Jun 29, 2010
-
-
Duncan Sands authored
llvm-svn: 107127
-
- Jun 26, 2010
-
-
Jakob Stoklund Olesen authored
The VNInfo.kills vector was almost unused except for all the code keeping it updated. The few places using it were easily rewritten to check for interval ends instead. The two new methods LiveInterval::killedAt and killedInRange are replacements. This brings us down to 3 independent data structures tracking kills. llvm-svn: 106905
-
- Jun 25, 2010
-
-
Jakob Stoklund Olesen authored
This fixes PR7479 and PR7485. The test cases from those PRs are big, so not included. However, PR7485 comes from self hosting on FreeBSD, so we will surely hear about any regression. llvm-svn: 106811
-