mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
Eliminate a log(n) lookup
llvm-svn: 33155
This commit is contained in:
parent
09efdecc2d
commit
996f22b99b
@ -279,7 +279,7 @@ void SlotCalculator::processSymbolTableConstants(const SymbolTable *ST) {
|
||||
|
||||
|
||||
void SlotCalculator::incorporateFunction(const Function *F) {
|
||||
assert((ModuleLevel.size() == 0 ||
|
||||
assert((ModuleLevel.empty() ||
|
||||
ModuleTypeLevel == 0) && "Module already incorporated!");
|
||||
|
||||
SC_DEBUG("begin processFunction!\n");
|
||||
@ -442,7 +442,7 @@ unsigned SlotCalculator::getOrCreateCompactionTableSlot(const Type *T) {
|
||||
unsigned SlotNo = CompactionTypes.size();
|
||||
SC_DEBUG("Inserting Compaction Type #" << SlotNo << ": " << *T << "\n");
|
||||
CompactionTypes.push_back(T);
|
||||
CompactionTypeMap[T] = SlotNo;
|
||||
CompactionTypeMap.insert(I, std::make_pair(T, SlotNo));
|
||||
return SlotNo;
|
||||
}
|
||||
|
||||
@ -639,7 +639,7 @@ void SlotCalculator::pruneCompactionTable() {
|
||||
/// to determine if its actually empty.
|
||||
bool SlotCalculator::CompactionTableIsEmpty() const {
|
||||
// Check a degenerate case, just in case.
|
||||
if (CompactionTable.size() == 0)
|
||||
if (CompactionTable.empty())
|
||||
return true;
|
||||
|
||||
// Check each plane
|
||||
|
Loading…
Reference in New Issue
Block a user