mc2lib
|
Top level class used to manage code generation (compiler). More...
#include <compiler.hpp>
Public Types | |
typedef Operation::EvtState | EvtState |
typedef Operation::Threads | Threads |
typedef Operation::ThreadIt | ThreadIt |
typedef Operation::ThreadItStack | ThreadItStack |
typedef Operation::ThreadConst | ThreadConst |
typedef Operation::Callback | Callback |
typedef Operation::CallbackStack | CallbackStack |
Public Member Functions | |
Compiler (std::unique_ptr< EvtState > evts) | |
Compiler (std::unique_ptr< EvtState > evts, Threads &&threads) | |
void | Reset () |
void | Reset (Threads &&threads) |
const Threads & | threads () |
const EvtState * | evts () const |
EvtState * | evts () |
std::size_t | Emit (types::InstPtr base, Operation *op, void *code, std::size_t len, ThreadConst *thread_const_ops, CallbackStack *callback_stack) |
std::size_t | Emit (types::Pid pid, types::InstPtr base, void *code, std::size_t len) |
bool | UpdateObs (types::InstPtr ip, int part, types::Addr addr, const types::WriteID *from_id, std::size_t size) |
Operation * | IpToOp (types::InstPtr ip) const |
Private Types | |
typedef std::map< types::InstPtr, std::pair< types::InstPtr, Operation * > > | InstPtr_Op |
Private Attributes | |
std::unique_ptr< EvtState > | evts_ |
Backend | backend_ |
Threads | threads_ |
InstPtr_Op | ip_to_op_ |
Top level class used to manage code generation (compiler).
typedef Operation::Callback mc2lib::codegen::Compiler< Operation, Backend >::Callback |
typedef Operation::CallbackStack mc2lib::codegen::Compiler< Operation, Backend >::CallbackStack |
typedef Operation::EvtState mc2lib::codegen::Compiler< Operation, Backend >::EvtState |
|
private |
typedef Operation::ThreadConst mc2lib::codegen::Compiler< Operation, Backend >::ThreadConst |
typedef Operation::ThreadIt mc2lib::codegen::Compiler< Operation, Backend >::ThreadIt |
typedef Operation::ThreadItStack mc2lib::codegen::Compiler< Operation, Backend >::ThreadItStack |
typedef Operation::Threads mc2lib::codegen::Compiler< Operation, Backend >::Threads |
|
inlineexplicit |
Implies a reset of state in evts.
evts | Pointer to instance of EvtState as required by Operation. The choice of unique_ptr here is deliberate, in that the class that Operation requires may be a virtual base class, and Compiler takes ownership. |
|
inlineexplicit |
Implies a reset of state in evts and threads (the Ops contained).
evts | Pointer to instance of EvtState as required by Operation. The choice of unique_ptr here is deliberate, in that the class that Operation requires may be a virtual base class. Takes ownership. | |
[in,out] | threads | Threads container. The Ops pointed to by Threads may be modified. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |