Writes the closed rules among the annexes of a backend's isel plugin as the C++ matchers and builders of a rules::Table in mim::plug::<backend>::rules, to -X <isel>:o=<file> or stdout.
More...
#include <mim/plug/mach/gen.h>
|
| struct | Annexes |
| | The annexes of the isel plugin that Gen knows; 0 for one it does not have. More...
|
|
| | Gen (World &world, flags_t annex, std::string_view backend, plugin_t backend_id, std::string_view isel, plugin_t isel_id, Annexes annexes) |
| | backend names the plugin whose instructions the rules of the plugin isel select.
|
| void | start () final |
| | Actual entry.
|
| std::string_view | backend () const |
| plugin_t | backend_id () const |
| std::string_view | isel () const |
| plugin_t | isel_id () const |
| const Annexes & | annexes () const |
| virtual u32 | cost (const App *insn) const =0 |
| virtual std::optional< size_t > | tied (const App *) const |
| | The operand whose register the result of the two-address instruction insn takes.
|
| virtual std::optional< mach::rules::Want > | classify (const Def *) const |
| | What an operand of the backend's address type type is: Want::Base, Want::Index, or Want::Addr.
|
| | Phase (World &world, std::string name) |
| | Phase (World &world, flags_t annex) |
| virtual | ~Phase ()=default |
| virtual std::unique_ptr< Phase > | recreate () |
| | Creates a new instance; needed by a fixed-point PhaseMan.
|
| virtual void | apply (const App *) |
| | Invoked if your Phase has additional args.
|
| virtual void | apply (Phase &) |
| | Dito, but invoked by Phase::recreate.
|
| virtual bool | redirects () const |
| | If true, Phase::create uses take_resolved().
|
| virtual std::unique_ptr< Phase > | take_resolved () |
| | The Phase to use instead; nullptr means elide.
|
| World & | world () |
| Driver & | driver () |
| const fe::Log & | log () const |
| std::string_view | name () const |
| flags_t | annex () const |
| const fe::Vector< std::string > & | args () |
| | Command-line arguments passed to this Phase's plugin via -X <plugin>:<arg>.
|
| bool | todo () const |
| void | invalidate (bool todo=true) |
| | Signals that another round of fixed-point iteration is required, either as part of.
|
| virtual void | run () |
| | Entry point and generates some debug output; invokes Phase::start.
|
| void | profile_count (std::string_view key, uint64_t n=1) |
| | Adds n to the custom fe::Profiler counter key of the current run; no-op unless profiling is enabled.
|
Writes the closed rules among the annexes of a backend's isel plugin as the C++ matchers and builders of a rules::Table in mim::plug::<backend>::rules, to -X <isel>:o=<file> or stdout.
The isel plugin derives from it and states the machine facts of its backend.
Definition at line 21 of file gen.h.
◆ mim::plug::mach::Gen::Annexes
| struct mim::plug::mach::Gen::Annexes |
The annexes of the isel plugin that Gen knows; 0 for one it does not have.
Definition at line 24 of file gen.h.
| Class Members |
|
flags_t |
addr = 0 |
addr p: the address p as an address operand, Want::Addr. |
|
flags_t |
commutes |
The tuple of the operations whose two operands a rule also matches swapped. |
|
flags_t |
formats |
The values of a family parameter of type «2; Nat». |
|
flags_t |
imm = 0 |
The guard imm x: Want::Imm. |
|
flags_t |
lit = 0 |
The guard lit x: a literal. |
|
flags_t |
reg_imm = 0 |
reg_imm x: Want::RegImm. |
|
flags_t |
reg_sh = 0 |
reg_sh x: Want::RegSh. |
|
flags_t |
scaled = 0 |
scaled i: Want::Scaled. |
|
flags_t |
sizes |
The values of a family parameter of type Nat. |
|
flags_t |
zx = 0 |
zx x: Want::Zx of a meta variable, else the non-terminal Zx of a rhs or conversion. |
◆ Gen()
◆ annexes()
| const Annexes & mim::plug::mach::Gen::annexes |
( |
| ) |
const |
|
inline |
◆ backend()
| std::string_view mim::plug::mach::Gen::backend |
( |
| ) |
const |
|
inline |
◆ backend_id()
| plugin_t mim::plug::mach::Gen::backend_id |
( |
| ) |
const |
|
inline |
◆ classify()
What an operand of the backend's address type type is: Want::Base, Want::Index, or Want::Addr.
Reimplemented in mim::plug::x86_isel::Gen.
Definition at line 67 of file gen.h.
◆ cost()
| virtual u32 mim::plug::mach::Gen::cost |
( |
const App * | insn | ) |
const |
|
pure virtual |
◆ isel()
| std::string_view mim::plug::mach::Gen::isel |
( |
| ) |
const |
|
inline |
◆ isel_id()
| plugin_t mim::plug::mach::Gen::isel_id |
( |
| ) |
const |
|
inline |
◆ start()
| void mim::plug::mach::Gen::start |
( |
| ) |
|
|
inlinefinalvirtual |
◆ tied()
| virtual std::optional< size_t > mim::plug::mach::Gen::tied |
( |
const App * | | ) |
const |
|
inlinevirtual |
The operand whose register the result of the two-address instruction insn takes.
Reimplemented in mim::plug::x86_isel::Gen.
Definition at line 65 of file gen.h.
The documentation for this class was generated from the following file:
- include/mim/plug/mach/gen.h