summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-07-20 16:29:20 +0000
committerChris Lattner <sabre@nondot.org>2005-07-20 16:29:20 +0000
commit05732c86d49e6595dd0ea0c23af4817895dcbb70 (patch)
tree9173b1c6544bc95f3212a303ef0bac7c3437efed /llvm/lib/ExecutionEngine
parent14568496c052d088d1fe3b3daf031e1a9740781c (diff)
downloadbcm5719-llvm-05732c86d49e6595dd0ea0c23af4817895dcbb70.tar.gz
bcm5719-llvm-05732c86d49e6595dd0ea0c23af4817895dcbb70.zip
count the number of relocations performed.
llvm-svn: 22480
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp3
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];
OpenPOWER on IntegriCloud