Add statistic

llvm-svn: 5026
This commit is contained in:
Chris Lattner 2002-12-13 15:28:42 +00:00
parent db133dbbd3
commit bf6ad7d307
1 changed files with 7 additions and 3 deletions

View File

@ -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) {