If a val# is defined by an implicit_def and it is being removed, all of the copies...
authorEvan Cheng <evan.cheng@apple.com>
Tue, 16 Jun 2009 07:12:58 +0000 (07:12 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 16 Jun 2009 07:12:58 +0000 (07:12 +0000)
commit67fcf56ac48f5fea50cd8a1573a2ff348c597190
tree799dcdbd1e39a273d3b4d351bbc5cd9c5c0017ff
parentdb3c169f3a3102d40352ba63fd14a75c819c7adc
If a val# is defined by an implicit_def and it is being removed, all of the copies off the val# were removed. This causes problem later since the scavenger will see uses of registers without defs. The proper solution is to change the copies into implicit_def's instead.

TurnCopyIntoImpDef turns a copy into implicit_def and remove the val# defined by it. This causes an scavenger assertion later if the def reaches other blocks. Disable the transformation if the value live interval extends beyond its def block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73478 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SimpleRegisterCoalescing.cpp
test/CodeGen/ARM/2009-06-15-RegScavengerAssert.ll [new file with mode: 0644]