message: Allow the type checker to run after select passes
  Summary: This adds an option to the config file that allows the user to specify some passes after which the type checker has to run.
diff: #include "PassManager.h"
  #include <cstdio>
  +#include <unordered_set>
  #include "ConfigFiles.h"
  #include "Debug.h"
  @@ -154,8 +155,14 @@ void PassManager::run_passes(DexStoresVector& stores,
  // Retrieve the type checker's settings.
  bool type_checker_enabled = m_config.isMember("ir_type_checker");
  auto type_checker_args = m_config["ir_type_checker"];
  - bool run_after_each_pass = type_checker_args.get("run_after_each_pass", false).asBool();
  + bool run_after_each_pass =
  + type_checker_args.get("run_after_each_pass", false).asBool();
  bool verify_moves = type_checker_args.get("verify_moves", false).asBool();
  + std::unordered_set<std::string> trigger_passes;
  +
  + for (auto& trigger_pass : type_checker_args["run_after_passes"]) {
  + trigger_passes.insert(trigger_pass.asString());
  + }
  for (size_t i = 0; i < m_activated_passes.size(); ++i) {
  Pass* pass = m_activated_passes[i];
  @@ -163,7 +170,8 @@ void PassManager::run_passes(DexStoresVector& stores,
  Timer t(pass->name() + " (run)");
  m_current_pass_info = &m_pass_info[i];
  pass->run_pass(stores, cfg, *this);
  - if (type_checker_enabled && run_after_each_pass) {
  + if (type_checker_enabled &&
  + (run_after_each_pass || trigger_passes.count(pass->name()) > 0)) {
  scope = build_class_scope(it);
  run_type_checker(scope, verify_moves);
  }
  