mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-15 16:07:49 +00:00
make getSlot/getTypeSlot inline
llvm-svn: 34130
This commit is contained in:
parent
cbbfa88ced
commit
31d8a25842
@ -278,18 +278,6 @@ void SlotCalculator::purgeFunction() {
|
||||
SC_DEBUG("end purgeFunction!\n");
|
||||
}
|
||||
|
||||
unsigned SlotCalculator::getSlot(const Value *V) const {
|
||||
std::map<const Value*, unsigned>::const_iterator I = NodeMap.find(V);
|
||||
assert(I != NodeMap.end() && "Value not in slotcalculator!");
|
||||
return (int)I->second;
|
||||
}
|
||||
|
||||
unsigned SlotCalculator::getTypeSlot(const Type*T) const {
|
||||
std::map<const Type*, unsigned>::const_iterator I = TypeMap.find(T);
|
||||
assert(I != TypeMap.end() && "Type not in slotcalc!");
|
||||
return I->second;
|
||||
}
|
||||
|
||||
void SlotCalculator::CreateSlotIfNeeded(const Value *V) {
|
||||
// Check to see if it's already in!
|
||||
if (NodeMap.count(V)) return;
|
||||
|
@ -65,8 +65,17 @@ public:
|
||||
/// getSlot - Return the slot number of the specified value in it's type
|
||||
/// plane. This returns < 0 on error!
|
||||
///
|
||||
unsigned getSlot(const Value *V) const;
|
||||
unsigned getTypeSlot(const Type* T) const;
|
||||
unsigned getSlot(const Value *V) const {
|
||||
std::map<const Value*, unsigned>::const_iterator I = NodeMap.find(V);
|
||||
assert(I != NodeMap.end() && "Value not in slotcalculator!");
|
||||
return I->second;
|
||||
}
|
||||
|
||||
unsigned getTypeSlot(const Type* T) const {
|
||||
std::map<const Type*, unsigned>::const_iterator I = TypeMap.find(T);
|
||||
assert(I != TypeMap.end() && "Type not in slotcalc!");
|
||||
return I->second;
|
||||
}
|
||||
|
||||
inline unsigned getNumPlanes() const { return Table.size(); }
|
||||
inline unsigned getNumTypes() const { return Types.size(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user