mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
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:
@@ -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))
|
||||
|
Reference in New Issue
Block a user