41 world.DLOG(
"Generate debug_phase: {}", app);
43 world.DLOG(
" Level: {}", level);
49 auto pass_array = app->as<
App>()->arg()->
projs();
51 for (
auto pass : pass_array) pass_list.push_back(pass);
57 auto phase_array = app->as<
App>()->arg()->
projs();
59 for (
auto phase : phase_array) phase_list.push_back(phase);
60 add_phases(phase_list, world, passes, builder);
auto projs(F f) const
Splits this Def via Def::projections into an Array (if A == -1_n) or std::array (otherwise).
void def2pass(const Def *, Pass *p)
void add_phase(Args &&... args)
This is a thin wrapper for std::span<T, N> with the following additional features:
The World represents the whole program and manages creation of MimIR nodes (Defs).
void add_phases(Defs phases, World &world, Passes &passes, PipelineBuilder &builder)
void add_passes(World &world, PipelineBuilder &builder, Passes &passes, DefVec &pass_list)
void register_normalizers(Normalizers &normalizers)
void handle_optimization_part(const Def *part, World &world, Passes &passes, PipelineBuilder &builder)
auto assert_emplace(C &container, Args &&... args)
Invokes emplace on container, asserts that insertion actually happened, and returns the iterator.
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...
void register_pass(Passes &passes, CArgs &&... args)
void register_pass_with_arg(Passes &passes)
MIM_EXPORT mim::Plugin mim_get_plugin()
absl::flat_hash_map< flags_t, NormalizeFn > Normalizers
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 constexpr flags_t Base
Basic info and registration function pointer to be returned from a specific plugin.