MimIR
0.5-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
dispatch_normalize.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
mim/phase.h
"
4
#include "
mim/tuple.h
"
5
6
namespace
mim
{
7
8
/// Normalizes Dispatch%es: η-expands non-Lam targets so that every target of a `(t_0, ..., t_n)#index`
9
/// jump table is a Lam, as later phases and the backends expect.
10
class
DispatchNormalize
:
public
RWPhase
{
11
public
:
12
using
RWPhase::RWPhase
;
13
14
private
:
15
const
Def
*
rewrite_mut_Lam
(
Lam
*)
final
;
16
/// η-expands the targets of @p sw to Lam%s, recursively.
17
const
Def
* normalize(
Switch
sw);
18
const
Def
* eta_expand(
const
Def
*);
19
};
20
21
}
// namespace mim
mim::Def
Base class for all Defs.
Definition
def.h:289
mim::DispatchNormalize
Normalizes Dispatches: η-expands non-Lam targets so that every target of a (t_0, ....
Definition
dispatch_normalize.h:10
mim::DispatchNormalize::rewrite_mut_Lam
const Def * rewrite_mut_Lam(Lam *) final
Definition
dispatch_normalize.cpp:7
mim::DispatchNormalize::RWPhase
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition
phase.h:334
mim::Lam
A function.
Definition
lam.h:91
mim::RWPhase::RWPhase
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition
phase.h:334
mim::Switch
Matches a jump table (target_0, target_1, ...)#index where index is a non-Literal Idx n and n the ari...
Definition
tuple.h:408
mim
Definition
ast.h:16
phase.h
tuple.h
include
mim
phase
dispatch_normalize.h
Generated by
1.18.0