[llvm] r282275 - [ResetMachineFunction] Add statistic on the number of reset functions.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 23 11:38:13 PDT 2016
Author: qcolombet
Date: Fri Sep 23 13:38:13 2016
New Revision: 282275
URL: http://llvm.org/viewvc/llvm-project?rev=282275&view=rev
Log:
[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).
Modified:
llvm/trunk/lib/CodeGen/ResetMachineFunctionPass.cpp
Modified: llvm/trunk/lib/CodeGen/ResetMachineFunctionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ResetMachineFunctionPass.cpp?rev=282275&r1=282274&r2=282275&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ResetMachineFunctionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/ResetMachineFunctionPass.cpp Fri Sep 23 13:38:13 2016
@@ -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();
More information about the llvm-commits
mailing list