forked from OSchip/llvm-project
count the number of relocations performed.
llvm-svn: 22480
This commit is contained in:
parent
14568496c0
commit
05732c86d4
|
@ -30,6 +30,7 @@ using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
Statistic<> NumBytes("jit", "Number of bytes of machine code compiled");
|
Statistic<> NumBytes("jit", "Number of bytes of machine code compiled");
|
||||||
|
Statistic<> NumRelos("jit", "Number of relocations applied");
|
||||||
JIT *TheJIT = 0;
|
JIT *TheJIT = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,6 +392,8 @@ void JITEmitter::finishFunction(MachineFunction &F) {
|
||||||
NumBytes += CurByte-CurBlock;
|
NumBytes += CurByte-CurBlock;
|
||||||
|
|
||||||
if (!Relocations.empty()) {
|
if (!Relocations.empty()) {
|
||||||
|
NumRelos += Relocations.size();
|
||||||
|
|
||||||
// Resolve the relocations to concrete pointers.
|
// Resolve the relocations to concrete pointers.
|
||||||
for (unsigned i = 0, e = Relocations.size(); i != e; ++i) {
|
for (unsigned i = 0, e = Relocations.size(); i != e; ++i) {
|
||||||
MachineRelocation &MR = Relocations[i];
|
MachineRelocation &MR = Relocations[i];
|
||||||
|
|
Loading…
Reference in New Issue