aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Writer/InstructionWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-26 18:40:14 +0000
committerChris Lattner <sabre@nondot.org>2002-07-26 18:40:14 +0000
commitce6ef112c4abb1f7fd64738c5760f48cddc9a4a5 (patch)
treed20df3512eb0212eaff8ebb8b0c077209944b242 /lib/Bytecode/Writer/InstructionWriter.cpp
parent0cbc6c2fd8470c62d824667fc600d80a494d26cd (diff)
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/InstructionWriter.cpp')
-rw-r--r--lib/Bytecode/Writer/InstructionWriter.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Bytecode/Writer/InstructionWriter.cpp b/lib/Bytecode/Writer/InstructionWriter.cpp
index 36414bea94..fdc5c5c143 100644
--- a/lib/Bytecode/Writer/InstructionWriter.cpp
+++ b/lib/Bytecode/Writer/InstructionWriter.cpp
@@ -16,8 +16,14 @@
#include "llvm/DerivedTypes.h"
#include "llvm/iOther.h"
#include "llvm/iTerminators.h"
+#include "Support/StatisticReporter.h"
#include <algorithm>
+static Statistic<>
+NumOversized("bytecodewriter\t- Number of oversized instructions");
+static Statistic<>
+NumNormal("bytecodewriter\t- Number of normal instructions");
+
typedef unsigned char uchar;
// outputInstructionFormat0 - Output those wierd instructions that have a large
@@ -48,6 +54,7 @@ static void outputInstructionFormat0(const Instruction *I,
}
align32(Out); // We must maintain correct alignment!
+ ++NumOversized;
}
@@ -97,6 +104,7 @@ static void outputInstrVarArgsCall(const Instruction *I,
output_vbr((unsigned)Slot, Out);
}
align32(Out); // We must maintain correct alignment!
+ ++NumOversized;
}
@@ -118,6 +126,7 @@ 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;
}
@@ -142,6 +151,7 @@ static void outputInstructionFormat2(const Instruction *I,
// cerr << "2 " << IType << " " << Type << " " << Slots[0] << " "
// << Slots[1] << endl;
output(Bits, Out);
+ ++NumNormal;
}
@@ -167,6 +177,7 @@ 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) {