History log of /external/llvm/lib/CodeGen/LiveInterval.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cddc3e03e4ec99c0268c03a126195173e519ed58 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r256229

http://b/26987366

(cherry picked from commit f3ef5332fa3f4d5ec72c178a2b19dac363a19383)

Change-Id: Ic75dcb63191d65df1b69724576392c0aaeb47728
/external/llvm/lib/CodeGen/LiveInterval.cpp
0c7f116bb6950ef819323d855415b2f2b0aad987 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r235153

Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7
/external/llvm/lib/CodeGen/LiveInterval.cpp
4c5e43da7792f75567b693105cc53e3f1992ad98 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master llvm for rebase to r233350

Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
/external/llvm/lib/CodeGen/LiveInterval.cpp
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
/external/llvm/lib/CodeGen/LiveInterval.cpp
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
/external/llvm/lib/CodeGen/LiveInterval.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/CodeGen/LiveInterval.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/CodeGen/LiveInterval.cpp
03d9609c6154ed91daefb4e4f89b7298c11961f3 10-Oct-2013 Matthias Braun <matze@braunis.de> Print register in LiveInterval::print()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
5649e25ce86b9d89d228ae7c392413571b0f8c19 10-Oct-2013 Matthias Braun <matze@braunis.de> Pass LiveQueryResult by value

This makes the API a bit more natural to use and makes it easier to make
LiveRanges implementation details private.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
87a86058fa0726328de42ace85b5532d18775646 10-Oct-2013 Matthias Braun <matze@braunis.de> Refactor LiveInterval: introduce new LiveRange class

LiveRange just manages a list of segments and a list of value numbers
now as LiveInterval did previously, but without having details like spill
weight or a fixed register number.
LiveInterval is now a subclass of LiveRange and simply adds the spill weight
and the register number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
331de11a0acc6a095b98914b5f05ff242c9d7819 10-Oct-2013 Matthias Braun <matze@braunis.de> Rename LiveRange to LiveInterval::Segment

The Segment struct contains a single interval; multiple instances of this struct
are used to construct a live range, but the struct is not a live range by
itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
b63db853500b3dcb46a96af3f2d5aec003e41d77 06-Sep-2013 Matthias Braun <matze@braunis.de> avoid unnecessary direct access to LiveInterval::ranges

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
1920156982643a1c5c28af6f4684580b516eb597 06-Sep-2013 Matthias Braun <matze@braunis.de> remove unused argument from LiveRanges::join()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
1c6d387dc90fba589f8effb17c72a39f966f87df 14-Aug-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove unnecessary parameter to RenumberValues.

Patch by Matthias Braun!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4 11-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
e0b59774cba9eb89ffba114635f3a1fa075910b1 23-May-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix PR16110: Handle DBG_VALUE in ConnectedVNInfoEqClasses::Distribute().

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
9bd7c3cc1306b6b2abc472d1e6ca2f7d0f3f3fbb 21-Feb-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't allocate memory in LiveInterval::join().

Rewrite value numbers directly in the 'Other' LiveInterval which is
moribund anyway. This avoids allocating the OtherAssignments vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
d983d4c6ed5ef69ca2d2e07350cc346245f35b87 20-Feb-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Use LiveRangeUpdater instead of mergeIntervalRanges.

Performance is the same, but LiveRangeUpdater has a more flexible
interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
1a41f32546019340f27a6f3854f3a73163a25dfe 20-Feb-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Add a LiveRangeUpdater class.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
fdf45175a8444c421c03627c139777d1de48e516 20-Feb-2013 David Blaikie <dblaikie@gmail.com> Fully qualify llvm::next to avoid ambiguity when building as C++11.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

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. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
e42561ad0c98b132515db89f2994c96d93e9587b 19-Nov-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Handle mixed normal and early-clobber defs on inline asm.

PR14376.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
657720bc6ed1f214c4e7f45f80dcc15b2e168288 27-Sep-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't dereference begin() on an empty vector.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
01b50ca5b397128d43167d617ba849d4a83282f1 12-Sep-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Delete dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
b720be6a50f4e1b3280d2b029ee38dda14577525 12-Sep-2012 Manman Ren <mren@apple.com> Release build: guard dump functions with
"#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)"

No functional change. Update r163339.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
77e300e8f0b8db8eec448cae9c87d7c5bfad9757 06-Sep-2012 Manman Ren <mren@apple.com> Release build: guard dump functions with "ifndef NDEBUG"

No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
45c5c57179e8b4938042431f8e12c9bfad67b3c8 06-Sep-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow overlaps between virtreg and physreg live ranges.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
b2beac2b9671f7d9773329d62c2821c8ac449ac5 03-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Completely eliminate VNInfo flags.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
bf60aa9db5953dd99c561dfa9323b1e3293a5a85 03-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Eliminate the VNInfo::hasPHIKill() flag.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
84315f03cb6127ac92a5b02239c6edc2a347069a 25-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Preserve 2-addr constraints in ConnectedVNInfoEqClasses.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
4e996de58cfad27033165d8feb8f296b8cbe20ca 11-Jul-2012 Chandler Carruth <chandlerc@gmail.com> Teach the LiveInterval::join function to use the fast merge algorithm,
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
1b8da1d8f14f91b88ff99d3bd5ec4d904cdf21b7 10-Jul-2012 Chandler Carruth <chandlerc@gmail.com> Fix a bug where I didn't test for an empty range before inspecting the
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
e585e75612ef5fd32e2bb2c9f635496791a20f8b 10-Jul-2012 Chandler Carruth <chandlerc@gmail.com> Add an efficient merge operation to LiveInterval and use it to avoid
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
261b6330896736f674bdb2dd4556a0483f3cfe8d 10-Jul-2012 Chandler Carruth <chandlerc@gmail.com> Teach LiveIntervals how to verify themselves and start using it in some
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
95c88b8cb210ffad127519a143fade685ab21f5b 05-Jul-2012 Chandler Carruth <chandlerc@gmail.com> Optimize extendIntervalEndTo a tiny bit by saving one call through the
vector erase. No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
b77ec7d26405125fa5685370af5f17fcc9edbecd 06-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Simplify LiveInterval::print().

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
4e53a40ea321c43bdf754147dd2ec064985e5b7b 05-Jun-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Implement LiveRangeCalc::extendToUses() and createDeadDefs().

These LiveRangeCalc methods are to be used when computing a live range
from scratch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
bd6f44a3a2a1404721bcbb67edf92b8480a3e655 19-May-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Run proper recursive dead code elimination during coalescing.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
ff11c0185391023d4f7b3254de94e11a5bb9cd58 28-Apr-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't update spill weights when joining intervals.

We don't compute spill weights until after coalescing anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
f4aee4c50e2ce46946f71bbb7d7a849b054018f7 28-Apr-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Spring cleaning - Delete dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
0aad7d274d6dfb0de1ebc00600cecf5e229b7c43 04-Feb-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Drop the REDEF_BY_EC VNInfo flag.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
d88710a3e0847baec0847b802637a48b71718d4d 02-Feb-2012 Lang Hames <lhames@gmail.com> Break as soon as the MustMapCurValNos flag is set - no need to reiterate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
02e08d5b4d9d368418debaf9ff2b3f07425ee0b6 02-Feb-2012 Lang Hames <lhames@gmail.com> PR11868. The previous loop in LiveIntervals::join would sometimes fall over if
more than two adjacent ranges needed to be merged. The new version should be
able to handle an arbitrary sequence of adjancent ranges.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
194eb71a11a77c7fb576780783a77e64924dfb10 14-Nov-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Use getVNInfoBefore() when it makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
2debd48ca790ac01be6e12e094fdf4fdcadc8364 13-Nov-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Rename SlotIndexes to match how they are used.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
573a32d4870ff4af7f59fc020caf07fb6ef61e37 15-Sep-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Leave hasPHIKill flags alone in LiveInterval::RenumberValues.

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().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
ee5655dca467d3812145a2f965c31edf4875c93e 13-Sep-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Switch extendInBlock() to take a kill slot instead of the last use slot.

Three out of four clients prefer this interface which is consistent with
extendIntervalEndTo() and LiveRangeCalc::extend().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
d2eff137ca94e7c21d90d327f13fcc5dd616fc15 20-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Replace a broken LiveInterval::MergeValueInAsValue() with something simpler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
2254227791ea267426b9ac674fc6d87decb65bc1 17-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Rewrite instructions as part of ConnectedVNInfoEqClasses::Distribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
55768d763d3d955c07d5819c3ef2e9d1ca6d2baf 12-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> That's it, I am declaring this a failure of the C++03 STL.

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().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6fd2472b1b2d8f6a64b38874cbca95d3578e16a4 11-Mar-2011 John Wiegley <johnw@boostpro.com> Fix use of CompEnd predicate to be standards conforming

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
5bf76cd11913310cef04a21aef6db29897f32939 08-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix the build for MSVC 9 whose upper_bound() wants to compare elements in the sorted array.

Patch by Olaf Krzikalla!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
3aefa7771d656fe9a0d6825dae35e28e60f0273f 08-Mar-2011 Oscar Fuentes <ofv@wanadoo.es> Revert "Make a comparator's argument `const'. This fixes the build for
MSVC 9."

The "fix" was meaningless.

This reverts commit r127245.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
86e4eeb6c79baf1c4bc4569a1e6ffc0c8f4b52b9 08-Mar-2011 Oscar Fuentes <ofv@wanadoo.es> Make a comparator's argument `const'. This fixes the build for MSVC 9.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
b64f669b666098b8494660fbd08a18610be228d4 03-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Avoid comparing invalid slot indexes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
9763e2bf39b84f18bd464b0cda61fe1cd98dcaae 02-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Move LiveIntervalMap::extendTo into LiveInterval itself.

This method could probably be used by LiveIntervalAnalysis::shrinkToUses, and
now it can use extendIntervalEndTo() which coalesces ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
ccdb3fcef9aeb9f683cd738afbe1cd961bb0c1ef 19-Jan-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Implement RAGreedy::splitAroundRegion and remove loop splitting.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
be97e906e03dd9b22e14f6749157c9d5f9701dd5 09-Jan-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Teach TargetRegisterInfo how to cram stack slot indexes in with the virtual and
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
4314268128be6d54c9a7f0709680e5a5b40f3ab3 09-Jan-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Replace TargetRegisterInfo::printReg with a PrintReg class that also works without a TRI instance.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
b907e8a2d40dc546f21ff7e122a80b121653851a 21-Dec-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Use IntEqClasses to compute connected components of live intervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
fb69f6037d1b79f83c895ed62dc3247e02bd2b5b 19-Dec-2010 Cameron Zwarich <zwarich@apple.com> Fix PR8815 by checking for an explicit clobber def tied to a use operand in
ConnectedVNInfoEqClasses::Classify().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6d309059a7d6257ddeb3b07e6c4b8b71cce2f707 29-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Teach ConnectedVNInfoEqClasses::Classify to deal with unused values.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
eeaae20be02979a5d1459cc479c4533be3c05ed5 29-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix broken equivalence class calculation. We could probably also use
EquvivalenceClasses.h except it looks like overkill when elements are continuous
integers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
ccefe32141c96faa05445bce0b26f1acd8bdc1b8 09-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> Silence compiler warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
54f32e6575d0c1b920ae5151c229f1187bae0cbf 08-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Classify value numbers into connected components in linear time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
0253df9a897ce541d56146699cedd79c464bda5e 08-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> After splitting, the remaining LiveInterval may be fragmented into multiple
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
a818c072af2f94704d08776d5bc7c50a012e40c2 05-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Tweak VNInfo printing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
201ecfca9892b2eab2d04aa5da59f3f5e1efe49d 05-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add assert for valid slot indexes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
e0a73ec0a982a4213f3de9860545d9bf2814593d 02-Oct-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> When RemoveCopyByCommutingDef is creating additional identity copies, just use
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6e2968c85c1e162ee5bc813769eab223e3df0f15 25-Sep-2010 Lang Hames <lhames@gmail.com> Removed VNInfo::isDefAccurate(). Def "accuracy" can be checked by testing whether LiveIntervals::getInstructionFromIndex(def) returns NULL.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
7c727072168c55493ec362e254af1cd740d7eaf2 21-Sep-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Refix MSVC9 and upper_bound. It actually needs a fully symmetric comparator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
89bfef003ec71792d078d489566655006b89bc43 21-Sep-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't pollute the global namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
2de0e808c1fa742f3eac68b5d10d182699cbbe04 21-Sep-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> MSVC9 does not support upper_bound with an asymmetric comparator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
f568b2706e274c7d8081cfd0a7ee9b881e5c313b 21-Sep-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add LiveInterval::find and use it for most LiveRange searching operations
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
0635ead2c4f2182a480a3281b9b2fff084a10634 21-Sep-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove dead method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
4a4bc3fba61dbb513f7213c7aa93faa30d18e0a2 08-Sep-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
07c2b7ff685523458f92339facfd814689e55873 04-Sep-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove dead code.

Clobber ranges are no longer used when joining physical registers.
Instead, all aliases are checked for interference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
fff2c4726baa0d6c9cb184c815677e33c0357c93 12-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Also recompute HasPHIKill flags in LiveInterval::RenumberValues.

If a phi-def value were removed from the interval, the phi-kill flags are no
longer valid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
1b2932024f098a6968645ac78d5848951d877c19 12-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
df30cf9e61e6586b45b74d1312bef1ee758ef94f 10-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Transpose the calculation of spill weights such that we are calculating one
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
23436597a8efad427059f2a6db5264e6a40d2dc7 06-Aug-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add LiveInterval::RenumberValues - Garbage collection for VNInfos.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
ee56c42168f6c4271593f6018c4409b6a5910302 02-Aug-2010 Oscar Fuentes <ofv@wanadoo.es> Prefix `next' iterator operation with `llvm::'.

Fixes potential ambiguity problems on VS 2010.

Patch by nobled!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6f4e4df1005e67917ebfcf66c8ea5bad5f587155 26-Jul-2010 Lang Hames <lhames@gmail.com> Factored out a bit of common code to mark VNInfos for deletion.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
d9f6ec977a9543e88c52fa5fb3737ae03402fc4c 13-Jul-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Print VNInfo flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6382d2caddb98f30f556b43faa898ff675affaf7 13-Jul-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add an assertion to make PR7542 fail consistently.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
186eb73845c29547cc837341f0c8c0f6d9284e67 13-Jul-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix LiveInterval::overlaps so it doesn't claim touching intervals overlap.
Also, one binary search is enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
90c64f4aac95ebfcdeb8ad78a373fdb9e61b002c 29-Jun-2010 Duncan Sands <baldrick@free.fr> Remove initialized but otherwise unused variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
15a571436da812c7cecbc3f3423ead2edff50358 26-Jun-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't track kills in VNInfo. Use interval ends instead.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
fa1e73c447b61ba180cc85b78b53d78a6b63bbf6 25-Jun-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Make sure all eliminated kills are removed from VNInfo lists.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
014b8631c0df0c5a91ccee2485bcd408844ed377 23-Jun-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add a few VNInfo data structure checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
991de14dd62dcbab4b31357ae22dc5b053ba50a0 30-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Introduce SpecificBumpPtrAllocator, a wrapper for BumpPtrAllocator which allows
only a single type of object to be allocated. Use it to make VNInfo destruction
typesafe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
7a8cf2822de1c69551588fc4395bdd0fec18611f 30-Mar-2010 Daniel Dunbar <daniel@zuster.org> Fix -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
01cb1b665da03e2b74c0724f71751e912ec8c2be 30-Mar-2010 Torok Edwin <edwintorok@gmail.com> Reapply r99881 with some fixes: only call destructor in releaseMemory!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
86af65552172c9149996600bc3f55bed6f949c8a 12-Jan-2010 Bob Wilson <bob.wilson@apple.com> Fix a comment typo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
5242154b558f0783830938f18153e0a7964fb4fa 04-Jan-2010 David Greene <greened@obbligato.org> Change errs() to dbgs().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6194569d22003fddaf1a33acdbb84d5efe76e7d7 09-Dec-2009 Lang Hames <lhames@gmail.com> Added a new "splitting" spiller.

When a call is placed to spill an interval this spiller will first try to
break the interval up into its component values. Single value intervals and
intervals which have already been split (or are the result of previous splits)
are spilled by the default spiller.

Splitting intervals as described above may improve the performance of generated
code in some circumstances. This work is experimental however, and it still
miscompiles many benchmarks. It's not recommended for general use yet.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
233a60ec40b41027ff429e2f2c27fa2be762f2e9 04-Nov-2009 Lang Hames <lhames@gmail.com> The Indexes Patch.

This introduces a new pass, SlotIndexes, which is responsible for numbering
instructions for register allocation (and other clients). SlotIndexes numbering
is designed to match the existing scheme, so this patch should not cause any
changes in the generated code.

For consistency, and to avoid naming confusion, LiveIndex has been renamed
SlotIndex.

The processImplicitDefs method of the LiveIntervals analysis has been moved
into its own pass so that it can be run prior to SlotIndexes. This was
necessary to match the existing numbering scheme.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6cc91e39c04c0c00756e7667f623f787c4851439 03-Oct-2009 Lang Hames <lhames@gmail.com> Oops. Renamed remaining MachineInstrIndex references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
cc3b0650f1feec45d1a2890b20c05c4b325f1788 03-Oct-2009 Lang Hames <lhames@gmail.com> Renamed MachineInstrIndex to LiveIndex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
35f291d2c5f80e8e713704190230064311bbbbbe 12-Sep-2009 Lang Hames <lhames@gmail.com> Moved some more index operations over to LiveIntervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
8651125d2885f74546b6e2a556082111d5b75da3 04-Sep-2009 Lang Hames <lhames@gmail.com> Replaces uses of unsigned for indexes in LiveInterval and VNInfo with
a new class, MachineInstrIndex, which hides arithmetic details from
most clients. This is a step towards allowing the register allocator
to update/insert code during allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
c02497f5bae87e71fd5617db5751cb0b3a14bbed 23-Aug-2009 Chris Lattner <sabre@nondot.org> shoot a few more std::ostream print methods in the head.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
52c1afcaea61440950a11a4ccadac4354420d727 11-Aug-2009 Lang Hames <lhames@gmail.com> Modified VNInfo. The "copy" member is now a union which holds the copy for a register interval, or the defining register for a stack interval. Access is via getCopy/setCopy and getReg/setReg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
a717b7be8886c4c6ae261ee553c5cbcae29c1e52 24-Jul-2009 Daniel Dunbar <daniel@zuster.org> More move to raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
1cd1d98232c3c3a0bd3810c3bf6c2572ea02f208 24-Jul-2009 Daniel Dunbar <daniel@zuster.org> Move more to raw_ostream, provide support for writing MachineBasicBlock,
LiveInterval, etc to raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
92b78bbc7f2ee919a2d09ed00fd35d1eb7f5f548 23-Jul-2009 David Greene <greened@obbligato.org> Reorder if-else branches as suggested by Bill.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
29ff37f39c305455752941fbf8a426b1f4d877fc 22-Jul-2009 David Greene <greened@obbligato.org> Make some changes suggested by Bill and Evan.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
80607c9b2bdb09993ac48e40c48852e124eb2c0b 22-Jul-2009 David Greene <greened@obbligato.org> Add some support for iterative coalescers to calculate a joined live
range's weight properly. This is turned off right now in the sense that
you'll get an assert if you get into a situation that can only be caused
by an iterative coalescer. All other code paths operate exactly as
before so there is no functional change with this patch. The asserts
should be disabled if/when an iterative coalescer gets added to trunk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
ffd1326ff8dfc652a8026c3faebf55bbba7c32c7 09-Jul-2009 Lang Hames <lhames@gmail.com> Improved tracking of value number kills. VN kills are now represented
as an (index,bool) pair. The bool flag records whether the kill is a
PHI kill or not. This code will be used to enable splitting of live
intervals containing PHI-kills.

A slight change to live interval weights introduced an extra spill
into lsr-code-insertion (outside the critical sections). The test
condition has been updated to reflect this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
98d5982e0020e0c18d2847798ba2f40c4711af5a 24-Jun-2009 Lang Hames <lhames@gmail.com> Fixed a bug in LiveInterval scaling (failure to scale VNI defs correctly), removed old TODO comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
857c4e01f85601cf2084adb860616256ee47c177 17-Jun-2009 Lang Hames <lhames@gmail.com> VNInfo cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
358dec51804ee52e47ea3a47c9248086e458ad7c 15-Jun-2009 Evan Cheng <evan.cheng@apple.com> Part 1.
- Change register allocation hint to a pair of unsigned integers. The hint type is zero (which means prefer the register specified as second part of the pair) or entirely target dependent.
- Allow targets to specify alternative register allocation orders based on allocation hint.

Part 2.
- Use the register allocation hint system to implement more aggressive load / store multiple formation.
- Aggressively form LDRD / STRD. These are formed *before* register allocation. It has to be done this way to shorten live interval of base and offset registers. e.g.
v1025 = LDR v1024, 0
v1026 = LDR v1024, 0
=>
v1025,v1026 = LDRD v1024, 0

If this transformation isn't done before allocation, v1024 will overlap v1025 which means it more difficult to allocate a register pair.

- Even with the register allocation hint, it may not be possible to get the desired allocation. In that case, the post-allocation load / store multiple pass must fix the ldrd / strd instructions. They can either become ldm / stm instructions or back to a pair of ldr / str instructions.

This is work in progress, not yet enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
90f95f88c6ce09c6744777dc9d140c3c77203b92 14-Jun-2009 Evan Cheng <evan.cheng@apple.com> Move register allocation preference (or hint) from LiveInterval to MachineRegisterInfo. This allows more passes to set them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
f41538d1b54f55e8900394929b50f7ce3e61125f 02-Jun-2009 Lang Hames <lhames@gmail.com> Update to in-place spilling framework. Includes live interval scaling and trivial rewriter.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
30590f502325321958b35bec7295159e3948291a 28-Apr-2009 Evan Cheng <evan.cheng@apple.com> Fix PR4034. Bug in LiveInterval::join when it's compacting new valno's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
27e4666c20650f2b10d93b98b7a0625a363df9df 27-Apr-2009 Evan Cheng <evan.cheng@apple.com> Also delete last unused val#.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
a4b2bab23313b1d45e1f3e6c9610a1e83fce4005 25-Apr-2009 Evan Cheng <evan.cheng@apple.com> Reuse unused val#'s to avoid running out of memory in extreme cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
0adb527d169e1f557676fda35bc9abb735e5c912 25-Apr-2009 Evan Cheng <evan.cheng@apple.com> Do not share a single unknown val# for all the live ranges merged into a physical sub-register live interval. When coalescer is merging in clobbered virtaul register live interval into a physical register live interval, give each virtual register val# a separate val# in the physical register live interval. Otherwise, the coalescer would have lost track of the definitions information it needs to make correct coalescing decisions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
cccdb2b602cf421d8890130308945163620ebc68 18-Apr-2009 Evan Cheng <evan.cheng@apple.com> Add a new LiveInterval::overlaps(). It checks if the live interval overlaps a range specified by [Start, End).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
97121ba2afb8d566ff1bf5c4e8fc5d4077940a7f 08-Apr-2009 Dan Gohman <gohman@apple.com> Implement support for using modeling implicit-zero-extension on x86-64
with SUBREG_TO_REG, teach SimpleRegisterCoalescing to coalesce
SUBREG_TO_REG instructions (which are similar to INSERT_SUBREG
instructions), and teach the DAGCombiner to take advantage of this on
targets which support it. This eliminates many redundant
zero-extension operations on x86-64.

This adds a new TargetLowering hook, isZExtFree. It's similar to
isTruncateFree, except it only applies to actual definitions, and not
no-op truncates which may not zero the high bits.

Also, this adds a new optimization to SimplifyDemandedBits: transform
operations like x+y into (zext (add (trunc x), (trunc y))) on targets
where all the casts are no-ops. In contexts where the high part of the
add is explicitly masked off, this allows the mask operation to be
eliminated. Fix the DAGCombiner to avoid undoing these transformations
to eliminate casts on targets where the casts are no-ops.

Also, this adds a new two-address lowering heuristic. Since
two-address lowering runs before coalescing, it helps to be able to
look through copies when deciding whether commuting and/or
three-address conversion are profitable.

Also, fix a bug in LiveInterval::MergeInClobberRanges. It didn't handle
the case that a clobber range extended both before and beyond an
existing live range. In that case, multiple live ranges need to be
added. This was exposed by the new subreg coalescing code.

Remove 2008-05-06-SpillerBug.ll. It was bugpoint-reduced, and the
spiller behavior it was looking for no longer occurrs with the new
instruction selection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
a2e6435e483f30e00382a5758f6dcc67e213b57a 11-Mar-2009 Evan Cheng <evan.cheng@apple.com> Two coalescer fixes in one.
1. Use the same value# to represent unknown values being merged into sub-registers.
2. When coalescer commute an instruction and the destination is a physical register, update its sub-registers by merging in the extended ranges.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
5b93f6fa82e33b17d618b3e24da513f547861481 02-Feb-2009 Owen Anderson <resistor@mac.com> MergeValueInto is too smart: it might choose to do the merge the opposite direction.
Live interval reconstruction needs to account for this, and scour its maps to
prevent dangling references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
5a3c6a87b0173b9d367f7b55e7c99e5110ede057 29-Jan-2009 Evan Cheng <evan.cheng@apple.com> Exit with nice warnings when register allocator run out of registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
42cc6e33ec0f63560c31f1928c56b4b0465d537c 29-Jan-2009 Evan Cheng <evan.cheng@apple.com> Fix comment about removeRange.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
86b49f8e2de796cb46c7c8b6a4c4900533fd53f4 24-Sep-2008 Dale Johannesen <dalej@apple.com> Next round of earlyclobber handling. Approach the
RA problem by expanding the live interval of an
earlyclobber def back one slot. Remove
overlap-earlyclobber throughout. Remove
earlyclobber bits and their handling from
live internals.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
fa48f941304f29f967e0a7fc6807d7026ba99b7b 19-Sep-2008 Dale Johannesen <dalej@apple.com> Remove AsmThatEarlyClobber etc. from LiveIntervalAnalysis
and redo as linked list walk. Logic moved into RA.
Per review feedback.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
a8c763b3071ae1a58ee8baeb282331245527e004 14-Aug-2008 Dan Gohman <gohman@apple.com> Use empty() instead of begin() == end().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
99ec779a93cf7a09ac336b63d2d67818960343a1 23-Jun-2008 Evan Cheng <evan.cheng@apple.com> Instead of adding an isSS field to LiveInterval to denote stack slot. Use top bit of 'reg' instead. If the top bit is set, than the LiveInterval represents a stack slot live interval.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
3f32d65912b4da23793dab618d981be2ce11c331 04-Jun-2008 Evan Cheng <evan.cheng@apple.com> Add a stack slot coloring pass. Not yet enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
e6d088acc90e422451e098555d383d4d65b6ce6b 26-Feb-2008 Bill Wendling <isanbard@gmail.com> Rename PrintableName to Name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
74ab84c31ef64538a1b56e1f282e49303412ad17 26-Feb-2008 Bill Wendling <isanbard@gmail.com> Change "Name" to "AsmName" in the target register info. Gee, a refactoring tool
would have been a Godsend here!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
4c71dfe356716e6bc1993ef5efdced08b68fe612 20-Feb-2008 Anton Korobeynikov <asl@math.spbu.ru> Update gcc 4.3 warnings fix patch with recent head changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
c8d044e4f779fdcfc5e7d592927740fd8f672a70 15-Feb-2008 Evan Cheng <evan.cheng@apple.com> - Removing the infamous r2rMap_ and rep() method. Now the coalescer will update
register defs and uses after each successful coalescing.
- Also removed a number of hacks and fixed some subtle kill information bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
d2b8d7bc51b0e41d09b32aeaa550358ccb379009 13-Feb-2008 Evan Cheng <evan.cheng@apple.com> - Added removeValNo() to remove all live ranges of a particular value#.
- removeRange() can now update value# information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6f0d024a534af18d9e60b3ea757376cd8a3a980e 10-Feb-2008 Dan Gohman <gohman@apple.com> Rename MRegisterInfo to TargetRegisterInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
294e6524916aecd874dddeede4cc074d31f5f59f 30-Jan-2008 Evan Cheng <evan.cheng@apple.com> Fixed a bug in MergeValueInAsValue() pointed out by David Greene. Replace val# with previous liverange's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
a6c3f80d970ea7a5c8597bca495495832a56a54b 14-Jan-2008 Chris Lattner <sabre@nondot.org> remove dead #include


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
4ee451de366474b9c228b4e5fa573795a715216d 29-Dec-2007 Chris Lattner <sabre@nondot.org> Remove attribution from file headers, per discussion on llvmdev.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
c3fc7d9ec9b495c8a88cd854247105c296d3aabd 29-Nov-2007 Evan Cheng <evan.cheng@apple.com> Replace the odd kill# hack with something less fragile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
c3868e04bf90d55f2599245ee7f3358d7b2a93ad 29-Nov-2007 Evan Cheng <evan.cheng@apple.com> Kill info update bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
3c1f4a4d4726d1213871c9fc9b42822341fd3f55 17-Oct-2007 Evan Cheng <evan.cheng@apple.com> Fix MergeValueInAsValue(). It allows overlapping live ranges but should replace
their value numbers with the specified value number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
34729256e8058d4106706e9feb2dfad7893502d1 14-Oct-2007 Evan Cheng <evan.cheng@apple.com> When coalescing an EXTRACT_SUBREG and the dst register is a physical register,
the source register will be coalesced to the super register of the LHS. Properly
merge in the live ranges of the resulting coalesced interval that were part of
the original source interval to the live interval of the super-register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
32dfbeada7292167bb488f36a71a5a6a519ddaff 12-Oct-2007 Evan Cheng <evan.cheng@apple.com> EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like
(almost) a register copy. However, it always coalesced to the register of the
RHS (the super-register). All uses of the result of a EXTRACT_SUBREG are sub-
register uses which adds subtle complications to load folding, spiller rewrite,
etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
af992f782fb2cac8d00b352c3dd73f6e782b5758 06-Sep-2007 David Greene <greened@obbligato.org> Constify to catch bugs.







git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
dd199d29b781bc713462f1255b63d3f153bfd9e9 06-Sep-2007 Evan Cheng <evan.cheng@apple.com> Fix a memory leak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
f3bb2e65d12857f83b273f4ecab013680310bbbc 05-Sep-2007 Evan Cheng <evan.cheng@apple.com> Use pool allocator for all the VNInfo's to improve memory access locality. This reduces coalescing time on siod Mac OS X PPC by 35%. Also remove the back ptr from VNInfo to LiveInterval and other tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
343013538f72f2202338f57161c0bd92344ca407 01-Sep-2007 Evan Cheng <evan.cheng@apple.com> More tweaks to improve compile time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
d4e4937b79a7da789379a09117cc74f20cd60623 31-Aug-2007 Evan Cheng <evan.cheng@apple.com> Remove an unnecessary element, saving 4 bytes per LiveInterval.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
7ecb38be0a533e7b9c7d3b8e9b5c8a6fa5f6b349 29-Aug-2007 Evan Cheng <evan.cheng@apple.com> Change LiveRange so it keeps a pointer to the VNInfo rather than an index.
Changes related modules so VNInfo's are not copied. This decrease
copy coalescing time by 45% and overall compilation time by 10% on siod.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
1a66f0a4f2348473263fab757d96588bc1e93554 28-Aug-2007 Evan Cheng <evan.cheng@apple.com> Recover most of the compile time regression due to recent live interval changes.
1. Eliminate the costly live interval "swapping".
2. Change ValueNumberInfo container from SmallVector to std::vector. The former
performs slowly when the vector size is very large.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
430a7b0c94bf9b505aedd9c7d977b43010d6c8f1 14-Aug-2007 Evan Cheng <evan.cheng@apple.com> Kill info update bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6047dd928067c9e2127c74152d22517ef3940d87 13-Aug-2007 Evan Cheng <evan.cheng@apple.com> Kill info update bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
4f8ff168de12eabdeb4b9437bf9402489ecf85cb 11-Aug-2007 Evan Cheng <evan.cheng@apple.com> Code to maintain kill information during register coalescing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
a141cfe5b2beb16599b5bab8c73333b31cc7a548 08-Aug-2007 Evan Cheng <evan.cheng@apple.com> Clean up and bug fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
8df786012dc6b875f31ba4152e09c6e0098082ee 08-Aug-2007 Evan Cheng <evan.cheng@apple.com> - Each val# can have multiple kills.
- Fix some minor bugs related to special markers on val# def. ~0U means
undefined, ~1U means dead val#.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
51cbf3c980e921a2950766282dfd6d9b2288eadd 08-Aug-2007 Evan Cheng <evan.cheng@apple.com> Remove a dead assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
a8d94f1315f722de056af03763664b77a5baac26 08-Aug-2007 Evan Cheng <evan.cheng@apple.com> - LiveInterval value#'s now have 3 components: def instruction #,
kill instruction #, and source register number (iff the value# is defined by a
copy).
- Now def instruction # is set for every value#, not just for copy defined ones.
- Update some outdated code related inactive live ranges.
- Kill info not yet set. That's next patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
e52eef8e9a10ada9efc1fed115e5b6eefb22b1da 17-Apr-2007 Evan Cheng <evan.cheng@apple.com> Add a register allocation preference field; add a method to compute size of a live interval.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
5c7e326585f3a543388ba871c3425f7664cd9143 17-Dec-2006 Bill Wendling <isanbard@gmail.com> Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
4b607748d86b44cc59e5cf3eee194dfd9b0fcd86 16-Dec-2006 Jeff Cohen <jeffc@jolt-lang.org> The best unbreakage yet, addressing Bill's concerns.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
c21c5eeb4f56f160e79522df2d3aab5cfe73c05d 15-Dec-2006 Jeff Cohen <jeffc@jolt-lang.org> An even better unbreakage...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
e81561909d128c6e2d8033cb5465a49b2596b26a 07-Dec-2006 Bill Wendling <isanbard@gmail.com> Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
bdc679d564e67a81792e463f6614b0088f975025 29-Nov-2006 Bill Wendling <isanbard@gmail.com> Converted to using llvm streams instead of <iostream>s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
38b0e7bbf2590f99122a2535d16f34bd12c3bb24 28-Nov-2006 Bill Wendling <isanbard@gmail.com> Put the #include for a module first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
d9fd2acc1f172e4b8c33c3562667102f9af4d28d 28-Nov-2006 Bill Wendling <isanbard@gmail.com> Changed to using llvm streams.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
3ed469ccd7b028a030b550d84b7336d146f5d8fa 02-Nov-2006 Reid Spencer <rspencer@reidspencer.com> For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
f21f0205b5dec61f165518887f54e01ab5aab13c 02-Sep-2006 Chris Lattner <sabre@nondot.org> When joining two intervals where the RHS is really simple, use a light-weight
method for joining the live ranges instead of the fully-general one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
91725b75852443923b419fd23215194cfc65dd88 31-Aug-2006 Chris Lattner <sabre@nondot.org> avoid calling the virtual isMoveInstr method endlessly by caching its results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6d8fbef015ff836bcb8f64f52c49805e43f8ea9f 30-Aug-2006 Chris Lattner <sabre@nondot.org> Teach the coallescer to coallesce live intervals joined by an arbitrary
number of copies, potentially defining live ranges that appear to have
differing value numbers that become identical when coallsced. Among other
things, this fixes CodeGen/X86/shift-coalesce.ll and PR687.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
e7f729b42b54fa751ba3524e1c597aad6d3ec3d7 26-Aug-2006 Chris Lattner <sabre@nondot.org> Simplifications to liveinterval analysis, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
c114b2cad7293d98686d380273085f5c32966b52 26-Aug-2006 Chris Lattner <sabre@nondot.org> Completely change the way that joining with physregs is implemented. This
paves the way for future changes, increases coallescing opportunities (in
theory, not witnessed in practice), and eliminates the really expensive
LiveIntervals::overlapsAliases method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
c82b3aab6502a9766ddf42b45faeca3d6fa0ad65 25-Aug-2006 Chris Lattner <sabre@nondot.org> When replacing value numbers, make sure to compactify the value # space.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
f7da2c7b0c6293c268881628fc351bed7763f1f4 25-Aug-2006 Chris Lattner <sabre@nondot.org> Take advantage of the recent improvements to the liveintervals set (tracking
instructions which define each value#) to simplify and improve the coallescer.
In particular, this patch:

1. Implements iterative coallescing.
2. Reverts an unsafe hack from handlePhysRegDef, superceeding it with a
better solution.
3. Implements PR865, "coallescing" away the second copy in code like:

A = B
...
B = A

This also includes changes to symbolically print registers in intervals
when possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
be4f88a8b8bb3311e0dc4cde8533763d7923c3ea 22-Aug-2006 Chris Lattner <sabre@nondot.org> Improve the LiveInterval class to keep track of which machine instruction
defines each value# tracked by the interval. This will be used to improve
coallescing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
9e20d352c2fec5731857313014107a586387d242 21-Oct-2005 Chris Lattner <sabre@nondot.org> Fix LiveInterval::getOverlapingRanges to take things in the right order
(an unused method).

Fix the merger so that it can merge ranges like this [10:12)[16:40) with
[12:38) into [10:40) instead of bogus ranges. This sort of input will be
possible for the merger coming shortly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
cef6010c64bc56fa2a8f1e7e9e28b8821adeceac 21-Oct-2005 Chris Lattner <sabre@nondot.org> Fix a conditional so we don't access past the end of the range. Thanks to
Andrew for bringing this to my attn.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
8317e12cef9b16b948231a20f02b4dd4c3623dfc 20-Oct-2005 Chris Lattner <sabre@nondot.org> Fix order of eval problem from when I refactored this into a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
b0fa11ca41d85e35d3c1155c6a3af1b67788fce6 20-Oct-2005 Chris Lattner <sabre@nondot.org> add a new method, play around with some code.

Fix a *bug* in the extendIntervalEndTo method. In particular, if adding
[2:10) to an interval containing [0:2),[10:30), we produced [0:10),[10,30).
Which is not the most smart thing to do. Now produce [0:30).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
f5ce2678f63f5776fddcfc34ae63ecdec622938c 20-Oct-2005 Chris Lattner <sabre@nondot.org> Refactor some code, pulling it out into a function. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
3c3fe462f7978b429ecdd71750c26be25c3d1335 21-Sep-2005 Chris Lattner <sabre@nondot.org> Expose the LiveInterval interfaces as public headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
38135af219c48a8626d6af34a92e7e8bb957c81f 14-May-2005 Chris Lattner <sabre@nondot.org> Print the symbolic register name in a register allocator debug dump.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
edf128a7fa90f2b0b7ee24741a04a7ae1ecd6f7e 22-Apr-2005 Misha Brukman <brukman+llvm@gmail.com> Remove trailing whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
ead1b3f0bb70cd9c1ba7a853a79070cb47db9344 04-Dec-2004 Chris Lattner <sabre@nondot.org> Prevent accessing past the end of the intervals vector, this fixes
Prolang-C/bison in the JIT


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
9fddc12c9b16a5526b0ee2e6f1da252f7974d7d0 18-Nov-2004 Chris Lattner <sabre@nondot.org> There is no need to check to see if j overflowed in this loop as we're only
incrementing i.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
1e409bfd2adf441b92f84e09706b768513f42c85 18-Nov-2004 Chris Lattner <sabre@nondot.org> Moderate head scratching reveals that this conditional is not needed. If
i->start == j->start, then certainly i->end > j->start.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
8c68b6a226ce46b35eafda972e04bf53128c2615 18-Nov-2004 Chris Lattner <sabre@nondot.org> Take another .7 seconds off of linear scan time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
bae74d9192f04d8185c7b4580565d56cc4ef53f2 18-Nov-2004 Chris Lattner <sabre@nondot.org> Add ability to give hints to the overlaps routines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
8311befb6968a581a3abdce1e13b5d63922662f7 16-Nov-2004 Brian Gaeke <gaeke@uiuc.edu> Give a better message for a common assertion failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
c4d3b918165461bc6f5d395bca8d9d9d8a84413d 28-Sep-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Fix includes. Patch contributed by Paolo Invernizzi!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
551ccae044b0ff658fe629dd67edd5ffe75d10e8 02-Sep-2004 Reid Spencer <rspencer@reidspencer.com> Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
c25b55a5b237772bbd7cc55988d3ca0ec569aede 25-Jul-2004 Chris Lattner <sabre@nondot.org> Fix the sense of joinable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
f542649f1b374b1bae845e4e4f6d1e82f90a9e31 25-Jul-2004 Chris Lattner <sabre@nondot.org> This patch makes use of the infrastructure implemented before to safely and
aggressively coallesce live ranges even if they overlap. Consider this LLVM
code for example:

int %test(int %X) {
%Y = mul int %X, 1 ;; Codegens to Y = X
%Z = add int %X, %Y
ret int %Z
}

The mul is just there to get a copy into the code stream. This produces
this machine code:

(0x869e5a8, LLVM BB @0x869b9a0):
%reg1024 = mov <fi#-2>, 1, %NOREG, 0 ;; "X"
%reg1025 = mov %reg1024 ;; "Y" (subsumed by X)
%reg1026 = add %reg1024, %reg1025
%EAX = mov %reg1026
ret

Note that the life times of reg1024 and reg1025 overlap, even though they
contain the same value. This results in this machine code:

test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %ECX, %EAX
add %EAX, %ECX
ret

Another, worse case involves loops and PHI nodes. Consider this trivial loop:
testcase:

int %test2(int %X) {
entry:
br label %Loop
Loop:
%Y = phi int [%X, %entry], [%Z, %Loop]
%Z = add int %Y, 1
%cond = seteq int %Z, 100
br bool %cond, label %Out, label %Loop
Out:
ret int %Z
}

Because of interactions between the PHI elimination pass and the register
allocator, this got compiled to this code:

test2:
mov %ECX, DWORD PTR [%ESP + 4]
.LBBtest2_1:
*** mov %EAX, %ECX
inc %EAX
cmp %EAX, 100
*** mov %ECX, %EAX
jne .LBBtest2_1

ret

Or on powerpc, this code:

_test2:
mflr r0
stw r0, 8(r1)
stwu r1, -60(r1)
.LBB_test2_1:
addi r2, r3, 1
cmpwi cr0, r2, 100
*** or r3, r2, r2
bne cr0, .LBB_test2_1

*** or r3, r2, r2
lwz r0, 68(r1)
mtlr r0
addi r1, r1, 60
blr 0



With this improvement in place, we now generate this code for these two
testcases, which is what we want:


test:
mov %EAX, DWORD PTR [%ESP + 4]
add %EAX, %EAX
ret

test2:
mov %EAX, DWORD PTR [%ESP + 4]
.LBBtest2_1:
inc %EAX
cmp %EAX, 100
jne .LBBtest2_1 # Loop
ret

Or on PPC:

_test2:
mflr r0
stw r0, 8(r1)
stwu r1, -60(r1)
.LBB_test2_1:
addi r3, r3, 1
cmpwi cr0, r3, 100
bne cr0, .LBB_test2_1

lwz r0, 68(r1)
mtlr r0
addi r1, r1, 60
blr 0


Static numbers for spill code loads/stores/reg-reg copies (smaller is better):

em3d: before: 47/25/26 after: 44/22/24
164.gzip: before: 433/245/310 after: 403/231/278
175.vpr: before: 3721/2189/1581 after: 4144/2081/1423
176.gcc: before: 26195/8866/9235 after: 25942/8082/8275
186.crafty: before: 4295/2587/3079 after: 4119/2519/2916
252.eon: before: 12754/7585/5803 after: 12508/7425/5643
256.bzip2: before: 463/226/315 after: 482:241/309


Runtime perf number samples on X86:

gzip: before: 41.09 after: 39.86
bzip2: runtime: before: 56.71s after: 57.07s
gcc: before: 6.16 after: 6.12
eon: before: 2.03s after: 2.00s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
d3a205eab5761298ccfb320834b5f0ea0184ab27 25-Jul-2004 Chris Lattner <sabre@nondot.org> Make a method const, no functionality changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
6925a9f9cc0b9d34cfbc19d9208c416e293ca516 25-Jul-2004 Chris Lattner <sabre@nondot.org> Fix a bug in the range remover


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
a1613db62fec94845aa8306232fb665273615bad 24-Jul-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Change std::map<unsigned, LiveInterval*> into a std::map<unsigned,
LiveInterval>. This saves some space and removes the pointer
indirection caused by following the pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
deb9971061cfb9c57930724fcf8d62fb26dc2213 24-Jul-2004 Chris Lattner <sabre@nondot.org> In the joiner, merge the small interval into the large interval. This restores
us back to taking about 10.5s on gcc, instead of taking 15.6s! The net result
is that my big patches have hand no significant effect on compile time or code
quality. heh.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
abf295fc6cfb438617e8b105022ce506f56674d8 24-Jul-2004 Chris Lattner <sabre@nondot.org> Little stuff:

* Fix comment typeo
* add dump() methods
* add a few new methods like getLiveRangeContaining, removeRange & joinable
(which is currently the same as overlaps)
* Remove the unused operator==

Bigger change:

* In LiveInterval, instead of using a boolean isDefinedOnce to keep track of
if there are > 1 definitions in a particular interval, keep a counter,
NumValues to keep track of exactly how many there are.
* In LiveRange, add a new ValId element to indicate which of the numbered
values each LiveRange belongs to. We now no longer merge LiveRanges if
they are of differing value ID's even if they are neighbors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
b26c215c059d4674bd6a9a8b94da86e497e64844 23-Jul-2004 Chris Lattner <sabre@nondot.org> Change addRange and join to be a little bit smarter. In particular, we don't
want to insert a new range into the middle of the vector, then delete ranges
one at a time next to the inserted one as they are merged.

Instead, if the inserted interval overlaps, just start merging. The only time
we insert into the middle of the vector is when we don't overlap at all. Also
delete blocks of live ranges if we overlap with many of them.

This patch speeds up joining by .7 seconds on a large testcase, but more
importantly gets all of the range adding code into addRangeFrom.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
aa14147cd6401e9c66dc9f81d1a47a90a5477159 23-Jul-2004 Chris Lattner <sabre@nondot.org> Search by the start point, not by the whole interval. This saves some
comparisons, reducing linscan by another .1 seconds :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
ebd7e6c54dce754a88d8f38df4ac2f388f35435e 23-Jul-2004 Chris Lattner <sabre@nondot.org> Instead of searching for a live interval pair, search for a location. This gives
a very modest speedup of .3 seconds compiling 176.gcc (out of 20s).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp
fb449b9ea5a37fb411aee7d42f6a76119602288d 23-Jul-2004 Chris Lattner <sabre@nondot.org> Pull the LiveRange and LiveInterval classes out of LiveIntervals.h (which
will soon be renamed) into their own file. The new file should not emit
DEBUG output or have other side effects. The LiveInterval class also now
doesn't know whether its working on registers or some other thing.

In the future we will want to use the LiveInterval class and friends to do
stack packing. In addition to a code simplification, this will allow us to
do it more easily.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/LiveInterval.cpp