diff options
author | Chris Lattner <sabre@nondot.org> | 2005-07-20 16:29:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-07-20 16:29:20 +0000 |
commit | e884dc2c586bc2f6646ffce89fef5100b412326e (patch) | |
tree | fbf8d9233013a99d957e1e8c9bfd143297ec6527 /lib/ExecutionEngine/JIT/JITEmitter.cpp | |
parent | 837451b168a434a0511fd8c88f5e6466318d2562 (diff) |
count the number of relocations performed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JITEmitter.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index 47adee0019..b38e778bfc 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -30,6 +30,7 @@ using namespace llvm; namespace { Statistic<> NumBytes("jit", "Number of bytes of machine code compiled"); + Statistic<> NumRelos("jit", "Number of relocations applied"); JIT *TheJIT = 0; } @@ -391,6 +392,8 @@ void JITEmitter::finishFunction(MachineFunction &F) { NumBytes += CurByte-CurBlock; if (!Relocations.empty()) { + NumRelos += Relocations.size(); + // Resolve the relocations to concrete pointers. for (unsigned i = 0, e = Relocations.size(); i != e; ++i) { MachineRelocation &MR = Relocations[i]; |