From 7b6040b41783a4c6abafed9cef84699ef7abc1a3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 7 Feb 2007 06:53:02 +0000 Subject: remove the handleVBR32/handleVBR64 callbacks. They are very fine-grained. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33994 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bytecode/Reader/Analyzer.cpp | 22 ---------------------- lib/Bytecode/Reader/Reader.cpp | 4 ---- 2 files changed, 26 deletions(-) (limited to 'lib/Bytecode/Reader') diff --git a/lib/Bytecode/Reader/Analyzer.cpp b/lib/Bytecode/Reader/Analyzer.cpp index 94224e36ab..02e1c66ae6 100644 --- a/lib/Bytecode/Reader/Analyzer.cpp +++ b/lib/Bytecode/Reader/Analyzer.cpp @@ -26,7 +26,6 @@ #include #include #include - using namespace llvm; namespace { @@ -542,27 +541,6 @@ public: bca.BlockSizes[llvm::BytecodeFormat::Reserved_DoNotUse] += 4; } - virtual void handleVBR32(unsigned Size ) { - bca.vbrCount32++; - bca.vbrCompBytes += Size; - bca.vbrExpdBytes += sizeof(uint32_t); - if (currFunc) { - currFunc->vbrCount32++; - currFunc->vbrCompBytes += Size; - currFunc->vbrExpdBytes += sizeof(uint32_t); - } - } - - virtual void handleVBR64(unsigned Size ) { - bca.vbrCount64++; - bca.vbrCompBytes += Size; - bca.vbrExpdBytes += sizeof(uint64_t); - if ( currFunc ) { - currFunc->vbrCount64++; - currFunc->vbrCompBytes += Size; - currFunc->vbrExpdBytes += sizeof(uint64_t); - } - } }; diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp index e6b9d8f655..8d0f86fcaa 100644 --- a/lib/Bytecode/Reader/Reader.cpp +++ b/lib/Bytecode/Reader/Reader.cpp @@ -86,7 +86,6 @@ inline unsigned BytecodeReader::read_uint() { inline unsigned BytecodeReader::read_vbr_uint() { unsigned Shift = 0; unsigned Result = 0; - BufPtr Save = At; do { if (At == BlockEnd) @@ -94,7 +93,6 @@ inline unsigned BytecodeReader::read_vbr_uint() { Result |= (unsigned)((*At++) & 0x7F) << Shift; Shift += 7; } while (At[-1] & 0x80); - if (Handler) Handler->handleVBR32(At-Save); return Result; } @@ -102,7 +100,6 @@ inline unsigned BytecodeReader::read_vbr_uint() { inline uint64_t BytecodeReader::read_vbr_uint64() { unsigned Shift = 0; uint64_t Result = 0; - BufPtr Save = At; do { if (At == BlockEnd) @@ -110,7 +107,6 @@ inline uint64_t BytecodeReader::read_vbr_uint64() { Result |= (uint64_t)((*At++) & 0x7F) << Shift; Shift += 7; } while (At[-1] & 0x80); - if (Handler) Handler->handleVBR64(At-Save); return Result; } -- cgit v1.2.3-70-g09d2