[TargetPassConfig] Add a hook to tell whether GlobalISel should warm on fallback.

Thanks to this patch, we know have a way to easly see if GlobalISel
failed.

llvm-svn: 280273
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index e11eb01..c094ab8 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -169,7 +169,8 @@
       return nullptr;
 
     // Pass to reset the MachineFunction if the ISel failed.
-    PM.add(createResetMachineFunctionPass());
+    PM.add(createResetMachineFunctionPass(
+        PassConfig->reportDiagnosticWhenGlobalISelFallback()));
 
     // Provide a fallback path when we do not want to abort on
     // not-yet-supported input.