[llvm] r249869 - CodeGen: Remove implicit iterator conversions from SlotIndexes.h, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 9 11:35:09 PDT 2015
Author: dexonsmith
Date: Fri Oct 9 13:35:09 2015
New Revision: 249869
URL: http://llvm.org/viewvc/llvm-project?rev=249869&view=rev
Log:
CodeGen: Remove implicit iterator conversions from SlotIndexes.h, NFC
Be explicit about changes between pointers and iterators, as with other
recent commits. This transitively removes implicit ilist iterator
conversions from about 20 source files in CodeGen.
Modified:
llvm/trunk/include/llvm/CodeGen/SlotIndexes.h
Modified: llvm/trunk/include/llvm/CodeGen/SlotIndexes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SlotIndexes.h?rev=249869&r1=249868&r2=249869&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SlotIndexes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SlotIndexes.h Fri Oct 9 13:35:09 2015
@@ -427,11 +427,11 @@ namespace llvm {
/// Returns the next non-null index, if one exists.
/// Otherwise returns getLastIndex().
SlotIndex getNextNonNullIndex(SlotIndex Index) {
- IndexList::iterator I = Index.listEntry();
+ IndexList::iterator I = Index.listEntry()->getIterator();
IndexList::iterator E = indexList.end();
while (++I != E)
if (I->getInstr())
- return SlotIndex(I, Index.getSlot());
+ return SlotIndex(&*I, Index.getSlot());
// We reached the end of the function.
return getLastIndex();
}
@@ -583,11 +583,11 @@ namespace llvm {
IndexList::iterator prevItr, nextItr;
if (Late) {
// Insert mi's index immediately before the following instruction.
- nextItr = getIndexAfter(mi).listEntry();
+ nextItr = getIndexAfter(mi).listEntry()->getIterator();
prevItr = std::prev(nextItr);
} else {
// Insert mi's index immediately after the preceding instruction.
- prevItr = getIndexBefore(mi).listEntry();
+ prevItr = getIndexBefore(mi).listEntry()->getIterator();
nextItr = std::next(prevItr);
}
@@ -649,11 +649,11 @@ namespace llvm {
if (nextMBB == mbb->getParent()->end()) {
startEntry = &indexList.back();
endEntry = createEntry(nullptr, 0);
- newItr = indexList.insertAfter(startEntry, endEntry);
+ newItr = indexList.insertAfter(startEntry->getIterator(), endEntry);
} else {
startEntry = createEntry(nullptr, 0);
- endEntry = getMBBStartIdx(nextMBB).listEntry();
- newItr = indexList.insert(endEntry, startEntry);
+ endEntry = getMBBStartIdx(&*nextMBB).listEntry();
+ newItr = indexList.insert(endEntry->getIterator(), startEntry);
}
SlotIndex startIdx(startEntry, SlotIndex::Slot_Block);
More information about the llvm-commits
mailing list