16 return {
"opt",
nullptr,
20 auto& driver = builder.world().driver();
22 auto plugin_axiom = args[1]->as<
Axiom>();
23 auto then_phase = args[2];
24 auto else_phase = args[3];
25 auto name = plugin_axiom->
sym();
27 auto plugin = tag.view().substr(0, tag.view().find(
'_'));
28 bool is_loaded = driver.is_loaded(driver.sym(plugin));
30 assert(tag.view().find(
'_') != std::string_view::npos &&
"mim/plugin_phase: invalid plugin name");
31 world.DLOG(
"mim/plugin_phase for: {}", plugin_axiom->sym());
32 world.DLOG(
"mim/plugin: {}", plugin);
33 world.DLOG(
"contained: {}", is_loaded);
The World represents the whole program and manages creation of MimIR nodes (Defs).
void handle_optimization_part(const Def *part, World &world, Passes &passes, PipelineBuilder &builder)
absl::flat_hash_map< flags_t, std::function< void(World &, PipelineBuilder &, const Def *)> > Passes
axiom ↦ (pipeline part) × (axiom application) → () The function should inspect Application to const...
MIM_EXPORT mim::Plugin mim_get_plugin()
std::pair< const Def *, std::vector< const Def * > > collect_args(const Def *def)
Helper function to cope with the fact that normalizers take all arguments and not only its axiom argu...
static std::tuple< Sym, Sym, Sym > split(Driver &, Sym)
static constexpr flags_t Base
Basic info and registration function pointer to be returned from a specific plugin.