MimIR 0.1
MimIR is my Intermediate Representation
|
Recurseivly rewrites part of a program into the provided World. More...
#include <mim/rewrite.h>
Public Member Functions | |
Rewriter (World &world) | |
World & | world () |
Ref | map (Ref old_def, Ref new_def) |
Map old_def to new_def and returns new_def ;. | |
rewrite | |
Recursively rewrite old Defs. | |
virtual Ref | rewrite (Ref) |
virtual Ref | rewrite_imm (Ref) |
virtual Ref | rewrite_mut (Def *) |
Recurseivly rewrites part of a program into the provided World.
Map old_def
to new_def
and returns new_def
;.
Definition at line 16 of file rewrite.h.
Referenced by rewrite(), rewrite_mut(), mim::VarRewriter::rewrite_mut(), and mim::VarRewriter::VarRewriter().
Definition at line 9 of file rewrite.cpp.
References mim::Def::isa_mut(), map(), rewrite_imm(), rewrite_mut(), mim::World::univ(), and world().
Referenced by mim::World::app(), mim::World::extract(), mim::rewrite(), mim::rewrite(), mim::plug::matrix::LowerMatrixLowLevel::rewrite_imm(), rewrite_imm(), rewrite_mut(), mim::Cleanup::start(), and mim::RWPhase::start().
Reimplemented in mim::plug::matrix::LowerMatrixLowLevel, and mim::VarRewriter.
Definition at line 16 of file rewrite.cpp.
References mim::Def::dep_const(), mim::Lit::isa(), mim::Def::num_ops(), mim::Def::op(), mim::Def::rebuild(), rewrite(), mim::Pack::shape(), mim::Def::type(), and world().
Referenced by rewrite(), mim::plug::matrix::LowerMatrixLowLevel::rewrite_imm(), and mim::VarRewriter::rewrite_imm().
Reimplemented in mim::VarRewriter.
Definition at line 32 of file rewrite.cpp.
References mim::Def::is_set(), map(), mim::Def::num_ops(), mim::Def::op(), rewrite(), mim::Def::stub(), mim::Def::type(), and world().
Referenced by rewrite(), and mim::VarRewriter::rewrite_mut().
|
inline |
Definition at line 14 of file rewrite.h.
Referenced by rewrite(), rewrite_imm(), rewrite_mut(), mim::VarRewriter::rewrite_mut(), and mim::VarRewriter::VarRewriter().