Merge into undefined lanes under -new-coalescer.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 17 Sep 2012 23:03:25 +0000 (23:03 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 17 Sep 2012 23:03:25 +0000 (23:03 +0000)
commit87f7864c6d81ae134335b8271ac12c937c81dffc
tree775f7cdefe682b919193144641cebe372ce0326c
parent98279e8d65fe5c86d0370b3e2a62f244985bec33
Merge into undefined lanes under -new-coalescer.

Add LIS::pruneValue() and extendToIndices(). These two functions are
used by the register coalescer when merging two live ranges requires
more than a trivial value mapping as supported by LiveInterval::join().

The pruneValue() function can remove the part of a value number that is
going to conflict in join(). Afterwards, extendToIndices can restore the
live range, using any new dominating value numbers and updating the SSA
form.

Use this complex value mapping to support merging a register into a
vector lane that has a conflicting value, but the clobbered lane is
undef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164074 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/LiveIntervalAnalysis.h
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/RegisterCoalescer.cpp
test/CodeGen/ARM/coalesce-subregs.ll