MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
arm.cpp
Go to the documentation of this file.
1#include "mim/plug/arm/arm.h"
2
3#include <mim/plugin.h>
4
6
7#include "mim/plug/arm/emit.h"
10
11using namespace mim;
12
17
18// clang-format off
19static constexpr PluginArg known_args[] = {
20 {"o=<file>, output=<file>", "Writes the assembly to `<file>` instead of the default `<world>.s`/`a.s`; `<file>` may be `-` for stdout."},
21 {"live=<file>", "Writes the output of `mach.live` to `<file>` instead of stdout."},
22 {"k=<n>", "Lets `mach.spilling` keep at most `<n>` values in registers instead of 26."},
23 {"color-dot=<file>", "Writes the register-assignment PBQP graph of each function in Graphviz DOT format to `<file>`, with the chosen options highlighted; `<file>` may be `-` for stdout."},
24};
25// clang-format on
26
28 plugin.register_normalizers = plug::arm::register_normalizers;
29 plugin.register_phases = reg_phases;
30 plugin.args = known_args;
31 plugin.num_args = std::size(known_args);
32 plugin.target = []() -> mim::Target* { return new plug::arm::Target(); };
33}
static void reg_phases(Flags2Phases &phases)
Definition arm.cpp:13
static constexpr PluginArg known_args[]
Definition arm.cpp:19
The machine a native backend compiles for, as far as libmim needs to know it.
Definition target.h:11
The machine facts of the AArch64 backend; the ABI is AAPCS64.
Definition target.h:10
constexpr Table table
void register_normalizers(Normalizers &normalizers)
void hook_isel(Flags2Phases &phases, const rules::Table &table)
Registers ISel with the rules table as the Phase of the backend's annex A.
Definition isel.h:60
void hook(Flags2Phases &phases)
Registers the Phase P for the annex A, constructed with the Target of the one loaded backend.
Definition phase.h:17
Definition ast.h:16
ankerl::unordered_dense::map< flags_t, std::function< std::unique_ptr< Phase >(World &)> > Flags2Phases
Maps an axiom of a Phase to a function that creates one.
Definition plugin.h:31
One -X <plugin>:<arg> a Plugin understands; see Arguments.
Definition plugin.h:35
#define MIM_PLUGIN_ENTRY(p)
Defines a Plugin's entry point; the body fills in the plugin handed to it, as in MIM_PLUGIN_ENTRY(dem...
Definition plugin.h:198