1
0
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:
Matthias Braun 2016-01-26 01:40:48 +00:00
parent b834dd994c
commit 036b32dcef
2 changed files with 5 additions and 5 deletions

View File

@ -213,7 +213,7 @@ namespace llvm {
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).
static bool isEarlierEqualInstr(SlotIndex A, SlotIndex B) {
return !isEarlierInstr(B, A);

View File

@ -1045,7 +1045,7 @@ private:
if (MO->isReg() && MO->isUse())
MO->setIsKill(false);
// 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);
OldIdxIn->end = NewIdx.getRegSlot(OldIdxIn->end.isEarlyClobber());
// 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?");
// If OldIdx was a dead def remove it.
if (!OldIdxDefIsDead) {
// Case 3: Remove segment starting at NewIdx and move begin of OldIdxOut
// to NewIdx so it can take its place.
// Remove segment starting at NewIdx and move begin of OldIdxOut to
// NewIdx so it can take its place.
OldIdxVNI->def = NewIdxDef;
OldIdxOut->start = NewIdxDef;
LR.removeValNo(NewIdxOut->valno);
} else {
// Case 4: Remove the dead def at OldIdx.
// Simply remove the dead def at OldIdx.
LR.removeValNo(OldIdxVNI);
}
} else {