[llvm-commits] [llvm] r114776 - in /llvm/trunk: include/llvm/CodeGen/LiveIntervalAnalysis.h include/llvm/CodeGen/SlotIndexes.h lib/CodeGen/SlotIndexes.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Sep 24 16:58:56 PDT 2010
Author: stoklund
Date: Fri Sep 24 18:58:56 2010
New Revision: 114776
URL: http://llvm.org/viewvc/llvm-project?rev=114776&view=rev
Log:
Terminator gaps were unused. Might as well delete them.
Modified:
llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h
llvm/trunk/include/llvm/CodeGen/SlotIndexes.h
llvm/trunk/lib/CodeGen/SlotIndexes.cpp
Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h?rev=114776&r1=114775&r2=114776&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h Fri Sep 24 18:58:56 2010
@@ -227,10 +227,6 @@
return indexes_->getMBBFromIndex(index);
}
- SlotIndex getMBBTerminatorGap(const MachineBasicBlock *mbb) {
- return indexes_->getTerminatorGap(mbb);
- }
-
SlotIndex InsertMachineInstrInMaps(MachineInstr *MI) {
return indexes_->insertMachineInstrInMaps(MI);
}
Modified: llvm/trunk/include/llvm/CodeGen/SlotIndexes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SlotIndexes.h?rev=114776&r1=114775&r2=114776&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SlotIndexes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SlotIndexes.h Fri Sep 24 18:58:56 2010
@@ -405,9 +405,6 @@
/// and MBB id.
std::vector<IdxMBBPair> idx2MBBMap;
- typedef DenseMap<const MachineBasicBlock*, SlotIndex> TerminatorGapsMap;
- TerminatorGapsMap terminatorGaps;
-
// IndexListEntry allocator.
BumpPtrAllocator ileAllocator;
@@ -579,14 +576,6 @@
return itr->second.second;
}
- /// Returns the terminator gap for the given index.
- SlotIndex getTerminatorGap(const MachineBasicBlock *mbb) {
- TerminatorGapsMap::iterator itr = terminatorGaps.find(mbb);
- assert(itr != terminatorGaps.end() &&
- "All MBBs should have terminator gaps in their indexes.");
- return itr->second;
- }
-
/// Returns the basic block which the given index falls in.
MachineBasicBlock* getMBBFromIndex(SlotIndex index) const {
std::vector<IdxMBBPair>::const_iterator I =
@@ -789,7 +778,6 @@
MachineFunction::iterator nextMBB =
llvm::next(MachineFunction::iterator(mbb));
IndexListEntry *startEntry = createEntry(0, 0);
- IndexListEntry *terminatorEntry = createEntry(0, 0);
IndexListEntry *nextEntry = 0;
if (nextMBB == mbb->getParent()->end()) {
@@ -799,15 +787,10 @@
}
insert(nextEntry, startEntry);
- insert(nextEntry, terminatorEntry);
SlotIndex startIdx(startEntry, SlotIndex::LOAD);
- SlotIndex terminatorIdx(terminatorEntry, SlotIndex::PHI_BIT);
SlotIndex endIdx(nextEntry, SlotIndex::LOAD);
- terminatorGaps.insert(
- std::make_pair(mbb, terminatorIdx));
-
mbb2IdxMap.insert(
std::make_pair(mbb, std::make_pair(startIdx, endIdx)));
Modified: llvm/trunk/lib/CodeGen/SlotIndexes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SlotIndexes.cpp?rev=114776&r1=114775&r2=114776&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SlotIndexes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SlotIndexes.cpp Fri Sep 24 18:58:56 2010
@@ -61,7 +61,6 @@
mi2iMap.clear();
mbb2IdxMap.clear();
idx2MBBMap.clear();
- terminatorGaps.clear();
clearList();
}
@@ -112,13 +111,6 @@
if (mi->isDebugValue())
continue;
- if (miItr == mbb->getFirstTerminator()) {
- push_back(createEntry(0, index));
- terminatorGaps.insert(
- std::make_pair(mbb, SlotIndex(back(), SlotIndex::PHI_BIT)));
- index += SlotIndex::NUM;
- }
-
// Insert a store index for the instr.
push_back(createEntry(mi, index));
@@ -135,13 +127,6 @@
index += (Slots + 1) * SlotIndex::NUM;
}
- if (mbb->getFirstTerminator() == mbb->end()) {
- push_back(createEntry(0, index));
- terminatorGaps.insert(
- std::make_pair(mbb, SlotIndex(back(), SlotIndex::PHI_BIT)));
- index += SlotIndex::NUM;
- }
-
// One blank instruction at the end.
push_back(createEntry(0, index));
@@ -179,7 +164,7 @@
curEntry->setIndex(index);
if (curEntry->getInstr() == 0) {
- // MBB start entry or terminator gap. Just step index by 1.
+ // MBB start entry. Just step index by 1.
index += SlotIndex::NUM;
}
else {
More information about the llvm-commits
mailing list