Refactor the IRPrinting instrumentation to take a derivable config.

This allows for more interesting behavior from users, e.g. enabling the ability to dump the IR to a separate file for each pass invocation.

PiperOrigin-RevId: 284059447
diff --git a/iree/compiler/Utils/TranslationUtils.cpp b/iree/compiler/Utils/TranslationUtils.cpp
index f177e6d..e8c10f8 100644
--- a/iree/compiler/Utils/TranslationUtils.cpp
+++ b/iree/compiler/Utils/TranslationUtils.cpp
@@ -61,13 +61,10 @@
 
 // Force enables IR printing on the |passManager|.
 void enableIRPrinting(PassManager *passManager) {
-  auto notVerifier = [](Pass *pass) {
-    return pass->getName() != "FunctionVerifier" &&
-           pass->getName() != "ModuleVerifier";
-  };
+  auto always = [](Pass *pass, Operation *op) { return true; };
   bool printModuleScope = false;
   passManager->enableIRPrinting(/*shouldPrintBeforePass=*/{},
-                                /*shouldPrintAfterPass=*/notVerifier,
+                                /*shouldPrintAfterPass=*/always,
                                 printModuleScope, llvm::dbgs());
   passManager->disableMultithreading();
 }