#include "Support/Statistic.h"
namespace {
+ Statistic<> NumBytes("jello", "Number of bytes of machine code compiled");
+
class Emitter : public MachineCodeEmitter {
VM &TheVM;
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) {