diff options
author | Chris Lattner <sabre@nondot.org> | 2003-01-21 20:13:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-01-21 20:13:49 +0000 |
commit | 5d965970421a3f776672275762334fdd8061be71 (patch) | |
tree | b76d72d2efab9c4693842154314fe7f4018bcf7e /llvm/lib/Bytecode/Writer | |
parent | cff8ebe6a3894409b516815eddf0922926ed135f (diff) | |
download | bcm5719-llvm-5d965970421a3f776672275762334fdd8061be71.tar.gz bcm5719-llvm-5d965970421a3f776672275762334fdd8061be71.zip |
Don't keep track of # big vs #small instructions seperately
llvm-svn: 5385
Diffstat (limited to 'llvm/lib/Bytecode/Writer')
-rw-r--r-- | llvm/lib/Bytecode/Writer/InstructionWriter.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/Bytecode/Writer/InstructionWriter.cpp b/llvm/lib/Bytecode/Writer/InstructionWriter.cpp index fe03554827f..587e6d1be62 100644 --- a/llvm/lib/Bytecode/Writer/InstructionWriter.cpp +++ b/llvm/lib/Bytecode/Writer/InstructionWriter.cpp @@ -18,9 +18,7 @@ #include <algorithm> static Statistic<> -NumOversized("bytecodewriter", "Number of oversized instructions"); -static Statistic<> -NumNormal("bytecodewriter", "Number of normal instructions"); +NumInstrs("bytecodewriter", "Number of instructions"); typedef unsigned char uchar; @@ -52,7 +50,6 @@ static void outputInstructionFormat0(const Instruction *I, } align32(Out); // We must maintain correct alignment! - ++NumOversized; } @@ -102,7 +99,6 @@ static void outputInstrVarArgsCall(const Instruction *I, output_vbr((unsigned)Slot, Out); } align32(Out); // We must maintain correct alignment! - ++NumOversized; } @@ -124,7 +120,6 @@ static void outputInstructionFormat1(const Instruction *I, unsigned Bits = 1 | (Opcode << 2) | (Type << 8) | (Slots[0] << 20); // cerr << "1 " << IType << " " << Type << " " << Slots[0] << endl; output(Bits, Out); - ++NumNormal; } @@ -149,7 +144,6 @@ static void outputInstructionFormat2(const Instruction *I, // cerr << "2 " << IType << " " << Type << " " << Slots[0] << " " // << Slots[1] << endl; output(Bits, Out); - ++NumNormal; } @@ -175,7 +169,6 @@ static void outputInstructionFormat3(const Instruction *I, //cerr << "3 " << IType << " " << Type << " " << Slots[0] << " " // << Slots[1] << " " << Slots[2] << endl; output(Bits, Out); - ++NumNormal; } void BytecodeWriter::processInstruction(const Instruction &I) { @@ -246,6 +239,8 @@ void BytecodeWriter::processInstruction(const Instruction &I) { } } + ++NumInstrs; + // Decide which instruction encoding to use. This is determined primarily by // the number of operands, and secondarily by whether or not the max operand // will fit into the instruction encoding. More operands == fewer bits per |