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 | 05732c86d49e6595dd0ea0c23af4817895dcbb70 (patch) | |
| tree | 9173b1c6544bc95f3212a303ef0bac7c3437efed | |
| parent | 14568496c052d088d1fe3b3daf031e1a9740781c (diff) | |
| download | bcm5719-llvm-05732c86d49e6595dd0ea0c23af4817895dcbb70.tar.gz bcm5719-llvm-05732c86d49e6595dd0ea0c23af4817895dcbb70.zip | |
count the number of relocations performed.
llvm-svn: 22480
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index 47adee00192..b38e778bfc7 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/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]; |

