//
//===----------------------------------------------------------------------===//
+#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#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
if (MF.getProperties().hasProperty(
MachineFunctionProperties::Property::FailedISel)) {
DEBUG(dbgs() << "Reseting: " << MF.getName() << '\n');
+ ++NumFunctionsReset;
MF.reset();
if (EmitFallbackDiag) {
const Function &F = *MF.getFunction();