Let tablegen compute maximum lanemask for regs/regclasses.

Let tablegen compute the combination of subregister lanemasks for all
subregisters in a register/register class. This is preparation for further
work subregister allocation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223873 91177308-0d34-0410-b5e6-96231b3b80d8
Add function that translates subregister lane masks to other subregs.

This works like the composeSubRegisterIndices() function but transforms
a subregister lane mask instead of a subregister index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223874 91177308-0d34-0410-b5e6-96231b3b80d8
LiveInterval: Add const version of LiveRange::advanceTo().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223875 91177308-0d34-0410-b5e6-96231b3b80d8
LiveInterval: Add a 'covers' operation to LiveRange.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223876 91177308-0d34-0410-b5e6-96231b3b80d8
LiveInterval: Add support to track liveness of subregisters.

This code adds the required data structures. Algorithms to compute it follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223877 91177308-0d34-0410-b5e6-96231b3b80d8
LiveIntervalAnalysis: Compute subregister ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223878 91177308-0d34-0410-b5e6-96231b3b80d8
LiveIntervalAnalysis: Make computeDeadValues() private.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223879 91177308-0d34-0410-b5e6-96231b3b80d8
LiveIntervalAnalysis: Update SubRanges in shrinkToUses().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223880 91177308-0d34-0410-b5e6-96231b3b80d8
LiveIntervalAnalysis: Adapt handleMove() to subregister ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223881 91177308-0d34-0410-b5e6-96231b3b80d8
LiveRangeEdit: Adapt eliminateDeadDef() to subregister liveness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223882 91177308-0d34-0410-b5e6-96231b3b80d8
LiveIntervalAnalysis: Adapt repairIntervalsInRange() to subregister liveness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223883 91177308-0d34-0410-b5e6-96231b3b80d8
Add a flag to enable/disable subregister liveness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223884 91177308-0d34-0410-b5e6-96231b3b80d8
LiveInterval: Introduce LiveQuery accessor for dead or live out values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223885 91177308-0d34-0410-b5e6-96231b3b80d8
LiveIntervalAnalysis: Add subregister aware variants pruneValue().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223886 91177308-0d34-0410-b5e6-96231b3b80d8
LiveInterval: Add removeEmptySubRanges().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223887 91177308-0d34-0410-b5e6-96231b3b80d8
RegisterCoalescer: Preserve subregister liveranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223888 91177308-0d34-0410-b5e6-96231b3b80d8
Tablegen'erate lanemasks for register units.

Now we can relate lanemasks in a virtual register to register units.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223889 91177308-0d34-0410-b5e6-96231b3b80d8
LiveIntervalUnion: Allow specification of liverange when unifying/extracting.

This allows it to add subregister ranges into the union.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223890 91177308-0d34-0410-b5e6-96231b3b80d8
LiveRegMatrix: Respect subregister liveness when allocating registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223891 91177308-0d34-0410-b5e6-96231b3b80d8
VirtRegMap: No implicit defs/uses for super registers with subreg liveness tracking.

Adding the implicit defs/uses to the superregisters is semantically questionable
but was not dangerous before as the register allocator never assigned the same
register to two overlapping LiveIntervals even when the actually live
subregisters do not overlap. With subregister liveness tracking enabled this
does actually happen and leads to subsequent bugs if we don't stop adding
the superregister defs/uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223892 91177308-0d34-0410-b5e6-96231b3b80d8