1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Add statistic

llvm-svn: 5026
This commit is contained in:
Chris Lattner 2002-12-13 15:28:42 +00:00
parent 70760e7cb9
commit ab38002b81

View File

@ -12,6 +12,8 @@
#include "Support/Statistic.h" #include "Support/Statistic.h"
namespace { namespace {
Statistic<> NumBytes("jello", "Number of bytes of machine code compiled");
class Emitter : public MachineCodeEmitter { class Emitter : public MachineCodeEmitter {
VM &TheVM; VM &TheVM;
@ -62,9 +64,11 @@ void Emitter::finishFunction(MachineFunction &F) {
BBRefs.clear(); BBRefs.clear();
BBLocations.clear(); BBLocations.clear();
DEBUG(std::cerr << "Finished Code Generation of Function: " NumBytes += CurByte-CurBlock;
<< F.getFunction()->getName() << ": " << CurByte-CurBlock
<< " bytes of text\n"); 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) { void Emitter::startBasicBlock(MachineBasicBlock &BB) {