MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::plug::x86_isel::Gen Class Reference

Writes the closed rules among the annexes of this plugin as the C++ matchers and builders of mim::plug::x86::rules. More...

#include <mim/plug/x86_isel/gen.h>

Inheritance diagram for mim::plug::x86_isel::Gen:
[legend]

Public Member Functions

 Gen (World &world, flags_t annex)
u32 cost (const App *insn) const final
std::optional< size_t > tied (const App *insn) const final
 The operand whose register the result of the two-address instruction insn takes.
std::optional< mach::rules::Want > classify (const Def *type) const final
 An x86.Addr i is a Base, an Index, or, for a dynamic i, either.
Public Member Functions inherited from mim::plug::mach::Gen
 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
Public Member Functions inherited from mim::Phase
 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.

Additional Inherited Members

Static Public Member Functions inherited from mim::Phase
static std::unique_ptr< Phase > create (const Flags2Phases &phases, const Def *def)
template<class A, class P>
static void hook (Flags2Phases &phases)
template<class P, class... Args>
static void run (Args &&... args)
 Runs a single Phase.
Protected Attributes inherited from mim::Phase
std::string name_

Detailed Description

Writes the closed rules among the annexes of this plugin as the C++ matchers and builders of mim::plug::x86::rules.

Definition at line 8 of file gen.h.

Constructor & Destructor Documentation

◆ Gen()

mim::plug::x86_isel::Gen::Gen ( World & world,
flags_t annex )

Definition at line 13 of file gen.cpp.

References mim::Phase::annex(), mim::Annex::base(), Gen(), and mim::Phase::world().

Referenced by Gen().

Member Function Documentation

◆ classify()

std::optional< Want > mim::plug::x86_isel::Gen::classify ( const Def * type) const
finalvirtual

An x86.Addr i is a Base, an Index, or, for a dynamic i, either.

Reimplemented from mim::plug::mach::Gen.

Definition at line 38 of file gen.cpp.

References mim::Axm::isa(), and mim::Lit::isa().

◆ cost()

u32 mim::plug::x86_isel::Gen::cost ( const App * insn) const
finalvirtual

The cost of the instruction insn of the backend, which a rule's cost sums up.

Implements mim::plug::mach::Gen.

Definition at line 33 of file gen.cpp.

References mim::plug::x86::insn::cost().

◆ tied()

std::optional< size_t > mim::plug::x86_isel::Gen::tied ( const App * insn) const
finalvirtual

The operand whose register the result of the two-address instruction insn takes.

Reimplemented from mim::plug::mach::Gen.

Definition at line 35 of file gen.cpp.

References mim::plug::x86::insn::tied().


The documentation for this class was generated from the following files:
  • include/mim/plug/x86_isel/gen.h
  • src/mim/plug/x86_isel/gen.cpp