Make SlotCalculator::getPlane an inline function. It is used inside loops.

llvm-svn: 34091
This commit is contained in:
Reid Spencer 2007-02-09 15:25:50 +00:00
parent ba09f90ddc
commit ca444882bd
2 changed files with 8 additions and 9 deletions

View File

@ -87,14 +87,6 @@ SlotCalculator::SlotCalculator(const Function *M ) {
incorporateFunction(M); // Start out in incorporated state
}
SlotCalculator::TypePlane &SlotCalculator::getPlane(unsigned Plane) {
// Okay we are just returning an entry out of the main Table. Make sure the
// plane exists and return it.
if (Plane >= Table.size())
Table.resize(Plane+1);
return Table[Plane];
}
// processModule - Process all of the module level function declarations and
// types that are available.
//

View File

@ -87,7 +87,14 @@ public:
return ModuleTypeLevel;
}
TypePlane &getPlane(unsigned Plane);
TypePlane &getPlane(unsigned Plane) {
// Okay we are just returning an entry out of the main Table. Make sure the
// plane exists and return it.
if (Plane >= Table.size())
Table.resize(Plane+1);
return Table[Plane];
}
TypeList& getTypes() { return Types; }
/// incorporateFunction/purgeFunction - If you'd like to deal with a function,