Also add <imp-use,kill> flags for redefined super-registers.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 5 Oct 2011 00:01:48 +0000 (00:01 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 5 Oct 2011 00:01:48 +0000 (00:01 +0000)
commit200a8cef256f6aade13692752a8fa8f6120cf04f
tree35a0d3109848ca250a7bf7c6d053b0ed40753dc2
parentb077cf338bd85a6a7397ec88d65278f02f0ed06f
Also add <imp-use,kill> flags for redefined super-registers.

For example:

  %vreg10:dsub_0<def,undef> = COPY %vreg1
  %vreg10:dsub_1<def> = COPY %vreg2

is rewritten as:

  %D2<def> = COPY %D0, %Q1<imp-def>
  %D3<def> = COPY %D1, %Q1<imp-use,kill>, %Q1<imp-def>

The first COPY doesn't care about the previous value of %Q1, so it
doesn't read that register.

The second COPY is a partial redefinition of %Q1, so it implicitly kills
and redefines that register.

This makes it possible to recognize instructions that can harmlessly
clobber the full super-register.  The write and don't read the
super-register.

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