mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
count the number of relocations performed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22480 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
837451b168
commit
e884dc2c58
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user