mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
LiveIntervalAnalysis: Improve some comments
As recommended by Justin. llvm-svn: 258771
This commit is contained in:
parent
b834dd994c
commit
036b32dcef
@ -213,7 +213,7 @@ namespace llvm {
|
|||||||
return A.listEntry()->getIndex() < B.listEntry()->getIndex();
|
return A.listEntry()->getIndex() < B.listEntry()->getIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return true if A referes to the same or an earlier instruction as B.
|
/// Return true if A refers to the same instruction as B or an earlier one.
|
||||||
/// This is equivalent to !isEarlierInstr(B, A).
|
/// This is equivalent to !isEarlierInstr(B, A).
|
||||||
static bool isEarlierEqualInstr(SlotIndex A, SlotIndex B) {
|
static bool isEarlierEqualInstr(SlotIndex A, SlotIndex B) {
|
||||||
return !isEarlierInstr(B, A);
|
return !isEarlierInstr(B, A);
|
||||||
|
@ -1045,7 +1045,7 @@ private:
|
|||||||
if (MO->isReg() && MO->isUse())
|
if (MO->isReg() && MO->isUse())
|
||||||
MO->setIsKill(false);
|
MO->setIsKill(false);
|
||||||
// Adjust OldIdxIn->end to reach NewIdx. This may temporarily make LR
|
// Adjust OldIdxIn->end to reach NewIdx. This may temporarily make LR
|
||||||
// invalid by overlapping ranges. Case 5 above.
|
// invalid by overlapping ranges.
|
||||||
bool isKill = SlotIndex::isSameInstr(OldIdx, OldIdxIn->end);
|
bool isKill = SlotIndex::isSameInstr(OldIdx, OldIdxIn->end);
|
||||||
OldIdxIn->end = NewIdx.getRegSlot(OldIdxIn->end.isEarlyClobber());
|
OldIdxIn->end = NewIdx.getRegSlot(OldIdxIn->end.isEarlyClobber());
|
||||||
// If this was not a kill, then there was no def and we're done.
|
// If this was not a kill, then there was no def and we're done.
|
||||||
@ -1166,13 +1166,13 @@ private:
|
|||||||
"Same value defined more than once?");
|
"Same value defined more than once?");
|
||||||
// If OldIdx was a dead def remove it.
|
// If OldIdx was a dead def remove it.
|
||||||
if (!OldIdxDefIsDead) {
|
if (!OldIdxDefIsDead) {
|
||||||
// Case 3: Remove segment starting at NewIdx and move begin of OldIdxOut
|
// Remove segment starting at NewIdx and move begin of OldIdxOut to
|
||||||
// to NewIdx so it can take its place.
|
// NewIdx so it can take its place.
|
||||||
OldIdxVNI->def = NewIdxDef;
|
OldIdxVNI->def = NewIdxDef;
|
||||||
OldIdxOut->start = NewIdxDef;
|
OldIdxOut->start = NewIdxDef;
|
||||||
LR.removeValNo(NewIdxOut->valno);
|
LR.removeValNo(NewIdxOut->valno);
|
||||||
} else {
|
} else {
|
||||||
// Case 4: Remove the dead def at OldIdx.
|
// Simply remove the dead def at OldIdx.
|
||||||
LR.removeValNo(OldIdxVNI);
|
LR.removeValNo(OldIdxVNI);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user