diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-09-23 18:38:13 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-09-23 18:38:13 +0000 |
commit | 0f4c20a1e747e6e38c6ef72a9c8241fe2755c0c5 (patch) | |
tree | 4eb211cf2829e5e3cfd79e1b0567d7f3d32dd657 /llvm/lib/CodeGen/ResetMachineFunctionPass.cpp | |
parent | d4c02437c16b52d49f6b2ead97c8b716c81de64b (diff) | |
download | bcm5719-llvm-0f4c20a1e747e6e38c6ef72a9c8241fe2755c0c5.tar.gz bcm5719-llvm-0f4c20a1e747e6e38c6ef72a9c8241fe2755c0c5.zip |
[ResetMachineFunction] Add statistic on the number of reset functions.
As the development of GlobalISel move forward, this statistic should
strictly decrease until it reaches zero. At this point, it would mean
GlobalISel can replace SDISel (at least on the tested inputs :P).
llvm-svn: 282275
Diffstat (limited to 'llvm/lib/CodeGen/ResetMachineFunctionPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ResetMachineFunctionPass.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp b/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp index 07a8259a70c..554760ff891 100644 --- a/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp +++ b/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp @@ -10,6 +10,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" @@ -19,6 +20,8 @@ using namespace llvm; #define DEBUG_TYPE "reset-machine-function" +STATISTIC(NumFunctionsReset, "Number of functions reset"); + namespace { class ResetMachineFunction : public MachineFunctionPass { /// Tells whether or not this pass should emit a fallback @@ -38,6 +41,7 @@ namespace { if (MF.getProperties().hasProperty( MachineFunctionProperties::Property::FailedISel)) { DEBUG(dbgs() << "Reseting: " << MF.getName() << '\n'); + ++NumFunctionsReset; MF.reset(); if (EmitFallbackDiag) { const Function &F = *MF.getFunction(); |