diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-11-19 06:01:12 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-11-19 06:01:12 +0000 |
| commit | ffa9d511f9df70838a77777de6b192554973ae22 (patch) | |
| tree | 7daae64084ccb812cab4f2cab3e603e6244116bb /llvm/lib/Bytecode/Reader/ReaderInternals.h | |
| parent | 2335331635ab66c823444b77271e1ebbbd7d3008 (diff) | |
| download | bcm5719-llvm-ffa9d511f9df70838a77777de6b192554973ae22.tar.gz bcm5719-llvm-ffa9d511f9df70838a77777de6b192554973ae22.zip | |
Minor speedup to do less linear time searches of information we already have.
speeds up disassembly of kc++ by .6s
llvm-svn: 10079
Diffstat (limited to 'llvm/lib/Bytecode/Reader/ReaderInternals.h')
| -rw-r--r-- | llvm/lib/Bytecode/Reader/ReaderInternals.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Bytecode/Reader/ReaderInternals.h b/llvm/lib/Bytecode/Reader/ReaderInternals.h index 53f699e6d08..8522aee4c29 100644 --- a/llvm/lib/Bytecode/Reader/ReaderInternals.h +++ b/llvm/lib/Bytecode/Reader/ReaderInternals.h @@ -180,7 +180,10 @@ private: Value *getValue(unsigned TypeID, unsigned num, bool Create = true); const Type *getType(unsigned ID); BasicBlock *getBasicBlock(unsigned ID); - Constant *getConstantValue(const Type *Ty, unsigned num); + Constant *getConstantValue(unsigned TypeID, unsigned num); + Constant *getConstantValue(const Type *Ty, unsigned num) { + return getConstantValue(getTypeSlot(Ty), num); + } unsigned insertValue(Value *V, ValueTable &Table); unsigned insertValue(Value *V, unsigned Type, ValueTable &Table); |

