Changes in directory llvm/lib/Bytecode/Writer:
SlotCalculator.cpp updated: 1.83 -> 1.84 SlotCalculator.h updated: 1.28 -> 1.29 --- Log message: Make SlotCalculator::getPlane an inline function. It is used inside loops. --- Diffs of the changes: (+8 -9) SlotCalculator.cpp | 8 -------- SlotCalculator.h | 9 ++++++++- 2 files changed, 8 insertions(+), 9 deletions(-) Index: llvm/lib/Bytecode/Writer/SlotCalculator.cpp diff -u llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.83 llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.84 --- llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.83 Fri Feb 9 01:51:47 2007 +++ llvm/lib/Bytecode/Writer/SlotCalculator.cpp Fri Feb 9 09:25:50 2007 @@ -87,14 +87,6 @@ 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. // Index: llvm/lib/Bytecode/Writer/SlotCalculator.h diff -u llvm/lib/Bytecode/Writer/SlotCalculator.h:1.28 llvm/lib/Bytecode/Writer/SlotCalculator.h:1.29 --- llvm/lib/Bytecode/Writer/SlotCalculator.h:1.28 Fri Feb 9 01:51:47 2007 +++ llvm/lib/Bytecode/Writer/SlotCalculator.h Fri Feb 9 09:25:50 2007 @@ -87,7 +87,14 @@ 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, _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits