Big change to compute logical value numbers for each LiveRange added to an
authorChris Lattner <sabre@nondot.org>
Sat, 24 Jul 2004 02:59:07 +0000 (02:59 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 24 Jul 2004 02:59:07 +0000 (02:59 +0000)
commit7ac2d3146a196fa0120c579ecd2ddd69652ad230
tree35c15d107e26f8d3ab252fcba3547ea376ed38e5
parent0f4c076140cbd9360650f75a896c88dcfacc526e
Big change to compute logical value numbers for each LiveRange added to an
Interval.  This generalizes the isDefinedOnce mechanism that we used before
to help us coallesce ranges that overlap.  As part of this, every logical
range with a different value is assigned a different number in the interval.
For example, for code that looks like this:

0  X = ...
4  X += ...
  ...
N    = X

We now generate a live interval that contains two ranges: [2,6:0),[6,?:1)
reflecting the fact that there are two different values in the range at
different positions in the code.

Currently we are not using this information at all, so this just slows down
liveintervals.  In the future, this will change.

Note that this change also substantially refactors the joinIntervalsInMachineBB
method to merge the cases for virt-virt and phys-virt joining into a single
case, adds comments, and makes the code a bit easier to follow.

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