mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 23:17:10 +00:00
Remove all of the annoying statistics now that I'm finished (for the near
term) working on bytecode size stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,21 +19,11 @@
|
||||
#include "Support/Statistic.h"
|
||||
using namespace llvm;
|
||||
|
||||
static Statistic<>
|
||||
TypeBytes("bytecodewriter", "Bytes of types");
|
||||
static Statistic<>
|
||||
ConstantBytes("bytecodewriter", "Bytes of constants");
|
||||
static Statistic<>
|
||||
NumConstants("bytecodewriter", "Number of constants");
|
||||
|
||||
|
||||
void BytecodeWriter::outputType(const Type *T) {
|
||||
TypeBytes -= Out.size();
|
||||
output_vbr((unsigned)T->getPrimitiveID(), Out);
|
||||
|
||||
// That's all there is to handling primitive types...
|
||||
if (T->isPrimitiveType()) {
|
||||
TypeBytes += Out.size();
|
||||
return; // We might do this if we alias a prim type: %x = type int
|
||||
}
|
||||
|
||||
@@ -107,16 +97,12 @@ void BytecodeWriter::outputType(const Type *T) {
|
||||
<< " Type '" << T->getDescription() << "'\n";
|
||||
break;
|
||||
}
|
||||
TypeBytes += Out.size();
|
||||
}
|
||||
|
||||
void BytecodeWriter::outputConstant(const Constant *CPV) {
|
||||
ConstantBytes -= Out.size();
|
||||
assert((CPV->getType()->isPrimitiveType() || !CPV->isNullValue()) &&
|
||||
"Shouldn't output null constants!");
|
||||
|
||||
++NumConstants;
|
||||
|
||||
// We must check for a ConstantExpr before switching by type because
|
||||
// a ConstantExpr can be of any type, and has no explicit value.
|
||||
//
|
||||
@@ -133,7 +119,6 @@ void BytecodeWriter::outputConstant(const Constant *CPV) {
|
||||
Slot = Table.getSlot((*OI)->getType());
|
||||
output_vbr((unsigned)Slot, Out);
|
||||
}
|
||||
ConstantBytes += Out.size();
|
||||
return;
|
||||
} else {
|
||||
output_vbr(0U, Out); // flag as not a ConstantExpr
|
||||
@@ -211,7 +196,6 @@ void BytecodeWriter::outputConstant(const Constant *CPV) {
|
||||
<< " type '" << CPV->getType()->getName() << "'\n";
|
||||
break;
|
||||
}
|
||||
ConstantBytes += Out.size();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -225,8 +209,6 @@ void BytecodeWriter::outputConstantStrings() {
|
||||
output_vbr(unsigned(E-I), Out);
|
||||
output_vbr(Type::VoidTyID, Out);
|
||||
|
||||
ConstantBytes -= Out.size();
|
||||
|
||||
// Emit all of the strings.
|
||||
for (I = Table.string_begin(); I != E; ++I) {
|
||||
const ConstantArray *Str = *I;
|
||||
@@ -238,8 +220,5 @@ void BytecodeWriter::outputConstantStrings() {
|
||||
// emit all of the characters.
|
||||
std::string Val = Str->getAsString();
|
||||
output_data(Val.c_str(), Val.c_str()+Val.size(), Out);
|
||||
|
||||
++NumConstants;
|
||||
}
|
||||
ConstantBytes += Out.size();
|
||||
}
|
||||
|
Reference in New Issue
Block a user