[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Analyzer.cpp Reader.cpp
Chris Lattner
sabre at nondot.org
Tue Feb 6 22:53:21 PST 2007
Changes in directory llvm/lib/Bytecode/Reader:
Analyzer.cpp updated: 1.32 -> 1.33
Reader.cpp updated: 1.232 -> 1.233
---
Log message:
remove the handleVBR32/handleVBR64 callbacks. They are very fine-grained.
---
Diffs of the changes: (+0 -26)
Analyzer.cpp | 22 ----------------------
Reader.cpp | 4 ----
2 files changed, 26 deletions(-)
Index: llvm/lib/Bytecode/Reader/Analyzer.cpp
diff -u llvm/lib/Bytecode/Reader/Analyzer.cpp:1.32 llvm/lib/Bytecode/Reader/Analyzer.cpp:1.33
--- llvm/lib/Bytecode/Reader/Analyzer.cpp:1.32 Tue Feb 6 23:08:39 2007
+++ llvm/lib/Bytecode/Reader/Analyzer.cpp Wed Feb 7 00:53:02 2007
@@ -26,7 +26,6 @@
#include <iomanip>
#include <sstream>
#include <ios>
-
using namespace llvm;
namespace {
@@ -542,27 +541,6 @@
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);
- }
- }
};
Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.232 llvm/lib/Bytecode/Reader/Reader.cpp:1.233
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.232 Tue Feb 6 23:15:28 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp Wed Feb 7 00:53:02 2007
@@ -86,7 +86,6 @@
inline unsigned BytecodeReader::read_vbr_uint() {
unsigned Shift = 0;
unsigned Result = 0;
- BufPtr Save = At;
do {
if (At == BlockEnd)
@@ -94,7 +93,6 @@
Result |= (unsigned)((*At++) & 0x7F) << Shift;
Shift += 7;
} while (At[-1] & 0x80);
- if (Handler) Handler->handleVBR32(At-Save);
return Result;
}
@@ -102,7 +100,6 @@
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 @@
Result |= (uint64_t)((*At++) & 0x7F) << Shift;
Shift += 7;
} while (At[-1] & 0x80);
- if (Handler) Handler->handleVBR64(At-Save);
return Result;
}
More information about the llvm-commits
mailing list