aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-12-13 15:28:42 +0000
committerChris Lattner <sabre@nondot.org>2002-12-13 15:28:42 +0000
commit395a8821bf0820d3c2cbaffd677688b8afb0a8fc (patch)
tree113bc976967edd91f4f7cb37f042a30df001e55f
parente4adeb47ff23fdc92e5f318bb1548f703b773b6e (diff)
Add statistic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5026 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/jello/Emitter.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/jello/Emitter.cpp b/tools/jello/Emitter.cpp
index c7876fea9b..253a229a38 100644
--- a/tools/jello/Emitter.cpp
+++ b/tools/jello/Emitter.cpp
@@ -12,6 +12,8 @@
#include "Support/Statistic.h"
namespace {
+ Statistic<> NumBytes("jello", "Number of bytes of machine code compiled");
+
class Emitter : public MachineCodeEmitter {
VM &TheVM;
@@ -62,9 +64,11 @@ void Emitter::finishFunction(MachineFunction &F) {
BBRefs.clear();
BBLocations.clear();
- DEBUG(std::cerr << "Finished Code Generation of Function: "
- << F.getFunction()->getName() << ": " << CurByte-CurBlock
- << " bytes of text\n");
+ NumBytes += CurByte-CurBlock;
+
+ DEBUG(std::cerr << "Finished CodeGen of [" << std::hex << (unsigned)CurBlock
+ << std::dec << "] Function: " << F.getFunction()->getName()
+ << ": " << CurByte-CurBlock << " bytes of text\n");
}
void Emitter::startBasicBlock(MachineBasicBlock &BB) {