MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::Switch Class Reference

Matches a jump table (target_0, target_1, ...)#index where index is a non-Literal Idx n and n the arity. More...

#include <mim/tuple.h>

Inheritance diagram for mim::Switch:
[legend]

Public Member Functions

 Switch (const Def *)
 operator bool () const noexcept
const Extract * extract () const
const Def * tuple () const
const Def * index () const
size_t num_targets () const
const Def * target (size_t i) const

Protected Attributes

const Extract * extract_ = nullptr

Detailed Description

Matches a jump table (target_0, target_1, ...)#index where index is a non-Literal Idx n and n the arity.

Definition at line 408 of file tuple.h.

Constructor & Destructor Documentation

◆ Switch()

Member Function Documentation

◆ extract()

const Extract * mim::Switch::extract ( ) const
inline

Definition at line 414 of file tuple.h.

References extract_.

Referenced by mim::Branch::Branch(), mim::Dispatch::Dispatch(), index(), Switch(), and tuple().

◆ index()

const Def * mim::Switch::index ( ) const
inline

Definition at line 416 of file tuple.h.

References extract(), and mim::Extract::index().

Referenced by mim::Select::cond().

◆ num_targets()

size_t mim::Switch::num_targets ( ) const
inline

Definition at line 418 of file tuple.h.

References mim::Lit::as(), and tuple().

Referenced by mim::Select::Select(), and target().

◆ operator bool()

mim::Switch::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 412 of file tuple.h.

References extract_.

◆ target()

const Def * mim::Switch::target ( size_t i) const
inline

Definition at line 419 of file tuple.h.

References num_targets(), mim::Def::proj(), and tuple().

Referenced by mim::Select::ff(), and mim::Select::tt().

◆ tuple()

const Def * mim::Switch::tuple ( ) const
inline

Definition at line 415 of file tuple.h.

References extract(), and mim::Extract::tuple().

Referenced by num_targets(), mim::Select::pair(), and target().

Member Data Documentation

◆ extract_

const Extract* mim::Switch::extract_ = nullptr
protected

Definition at line 422 of file tuple.h.

Referenced by extract(), operator bool(), mim::Select::Select(), and Switch().


The documentation for this class was generated from the following files: