Handle IMPLICIT_DEF with isUndef operand marker, part 2. This patch moves the code to annotate machineoperands to LiveIntervalAnalysis. It also add markers for implicit_def that define physical registers. The rest, is just a lot of details.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2009-07-01 01:59:31 +00:00
parent 5bcc8bd0c6
commit 2578ba26e7
13 changed files with 443 additions and 62 deletions

View File

@@ -254,6 +254,8 @@ void RegScavenger::forward() {
unsigned Idx = (i < NumECs)
? EarlyClobberMOs[i].second : DefMOs[i-NumECs].second;
unsigned Reg = MO.getReg();
if (MO.isUndef())
continue;
// If it's dead upon def, then it is now free.
if (MO.isDead()) {
@@ -262,7 +264,9 @@ void RegScavenger::forward() {
}
// Skip two-address destination operand.
if (MI->isRegTiedToUseOperand(Idx)) {
unsigned UseIdx;
if (MI->isRegTiedToUseOperand(Idx, &UseIdx) &&
!MI->getOperand(UseIdx).isUndef()) {
assert(isUsed(Reg) && "Using an undefined register!");
continue;
}
@@ -316,6 +320,8 @@ void RegScavenger::backward() {
? *DefMOs[i].first : *EarlyClobberMOs[i-NumDefs].first;
unsigned Idx = (i < NumECs)
? DefMOs[i].second : EarlyClobberMOs[i-NumDefs].second;
if (MO.isUndef())
continue;
// Skip two-address destination operand.
if (MI->isRegTiedToUseOperand(Idx))