class
InstMaat IR instructions.
An IR instruction is made of an operation followed by one or several parameters.
Contents
❱ Constructors, destructors, conversion operators
- Inst()
- Empty constructor.
- Inst(Op op, const std::optional<Param>& out = std::nullopt, const std::optional<Param>& in0 = std::nullopt, const std::optional<Param>& in1 = std::nullopt, const std::optional<Param>& in2 = std::nullopt)
- Basic constructor.
- Inst(const Inst& other) defaulted
- Copy constructor.
- ~Inst() defaulted
- Default destructor.
❱ Public functions
-
auto reads_reg(reg_
t reg) const -> bool - Return True if instruction reads the register 'reg'.
-
auto writes_reg(reg_
t reg) const -> bool - Return True if instruction modifies the register 'reg'.
-
auto uses_reg(reg_
t reg) const -> bool - Return True if instruction reads or modifies the register 'reg'.
-
auto reads_tmp(tmp_
t tmp) const -> bool - Return True if instruction reads the temporary 'tmp'.
-
auto writes_tmp(tmp_
t tmp) const -> bool - Return True if instruction modifies the temporary 'tmp'.
- void get_written_regs(param_list_t& res) const
- Writes the list of CPU registers modified by this instruction in 'res'.
- void get_read_regs(param_list_t& res) const
- Writes the list of CPU registers read by this instruction in 'res'.
- void get_written_tmps(param_list_t& res) const
- Writes the list of temporaries modified by this instruction in 'res'.
- void get_read_tmps(param_list_t& res) const
- Writes the list of temporaries modified by this instruction in 'res'.
❱ Public variables
- Op op
- Operation.
- Param out
- Output parameter.
- Param in
- Input parameters.
-
callother::
Id callother_id - Callother Id if CALLOTHER operation.