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
This commit is contained in:
Chris Lattner
2007-02-07 06:53:02 +00:00
parent 92f5b6a784
commit 7b6040b417
3 changed files with 0 additions and 35 deletions

View File

@@ -308,15 +308,6 @@ public:
unsigned Size ///< The size of the block unsigned Size ///< The size of the block
) {} ) {}
/// @brief Handle a variable bit rate 32 bit unsigned
virtual void handleVBR32(
unsigned Size ///< Number of bytes the vbr_uint took up
) {}
/// @brief Handle a variable bit rate 64 bit unsigned
virtual void handleVBR64(
unsigned Size ///< Number of byte sthe vbr_uint64 took up
) {}
/// @} /// @}
}; };

View File

@@ -26,7 +26,6 @@
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
#include <ios> #include <ios>
using namespace llvm; using namespace llvm;
namespace { namespace {
@@ -542,27 +541,6 @@ public:
bca.BlockSizes[llvm::BytecodeFormat::Reserved_DoNotUse] += 4; 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);
}
}
}; };

View File

@@ -86,7 +86,6 @@ inline unsigned BytecodeReader::read_uint() {
inline unsigned BytecodeReader::read_vbr_uint() { inline unsigned BytecodeReader::read_vbr_uint() {
unsigned Shift = 0; unsigned Shift = 0;
unsigned Result = 0; unsigned Result = 0;
BufPtr Save = At;
do { do {
if (At == BlockEnd) if (At == BlockEnd)
@@ -94,7 +93,6 @@ inline unsigned BytecodeReader::read_vbr_uint() {
Result |= (unsigned)((*At++) & 0x7F) << Shift; Result |= (unsigned)((*At++) & 0x7F) << Shift;
Shift += 7; Shift += 7;
} while (At[-1] & 0x80); } while (At[-1] & 0x80);
if (Handler) Handler->handleVBR32(At-Save);
return Result; return Result;
} }
@@ -102,7 +100,6 @@ inline unsigned BytecodeReader::read_vbr_uint() {
inline uint64_t BytecodeReader::read_vbr_uint64() { inline uint64_t BytecodeReader::read_vbr_uint64() {
unsigned Shift = 0; unsigned Shift = 0;
uint64_t Result = 0; uint64_t Result = 0;
BufPtr Save = At;
do { do {
if (At == BlockEnd) if (At == BlockEnd)
@@ -110,7 +107,6 @@ inline uint64_t BytecodeReader::read_vbr_uint64() {
Result |= (uint64_t)((*At++) & 0x7F) << Shift; Result |= (uint64_t)((*At++) & 0x7F) << Shift;
Shift += 7; Shift += 7;
} while (At[-1] & 0x80); } while (At[-1] & 0x80);
if (Handler) Handler->handleVBR64(At-Save);
return Result; return Result;
} }