![]() |
PandA-2024.02
|
#include <instruction_writer.hpp>


Public Member Functions | |
| virtual | ~InstructionWriter () |
| Destructor. More... | |
| virtual void | Initialize () |
| Initialize data structure. More... | |
| virtual void | write (const FunctionBehaviorConstRef function_behavior, const vertex statement, const var_pp_functorConstRef varFunctor) |
| Write a statement. More... | |
| virtual void | declareFunction (const unsigned int function_id) |
| Write the declaration of a function. More... | |
| virtual void | write_declarations () |
| Write code needed for declaration/initialization of auxiliary variables. More... | |
| void | WriteComment (const std::string &text) |
| Writes a comment. More... | |
Static Public Member Functions | |
| static InstructionWriterRef | CreateInstructionWriter (const ActorGraphBackend_Type actor_graph_backend_type, const application_managerConstRef AppM, const IndentedOutputStreamRef indented_output_stream, const ParameterConstRef parameters) |
| Factory method. More... | |
Protected Member Functions | |
| InstructionWriter (const application_managerConstRef AppM, const IndentedOutputStreamRef indented_output_stream, const ParameterConstRef parameters) | |
| Constructor; it is protected since factory method should be used. More... | |
Protected Attributes | |
| const application_managerConstRef | AppM |
| The application manager. More... | |
| const IndentedOutputStreamRef | indented_output_stream |
| The indented output stream. More... | |
| const ParameterConstRef | parameters |
| The set of input parameters. More... | |
| int | debug_level |
| The debug level. More... | |
Definition at line 68 of file instruction_writer.hpp.
|
protected |
Constructor; it is protected since factory method should be used.
| AppM | is the application manager |
| indented_output_stream | is the output stream for source code |
| parameters | is the set of input parameters |
Definition at line 58 of file instruction_writer.cpp.
References debug_level, GET_CLASS, and parameters.
Referenced by CreateInstructionWriter().

|
virtualdefault |
|
static |
Factory method.
| actor_graph_backend_type | is the type of thread model to be considered in backend |
| AppM | is the application manager |
| indented_output_stream | is the output stream |
| parameters | is the set of input parameters |
Definition at line 66 of file instruction_writer.cpp.
References BA_NONE, InstructionWriter(), THROW_UNREACHABLE, and ~InstructionWriter().
Referenced by CWriter::CreateCWriter().


|
virtual |
Write the declaration of a function.
| function_id | is the index of the function |
Reimplemented in HLSInstructionWriter, and discrepancy_instruction_writer.
Definition at line 103 of file instruction_writer.cpp.
References IndentedOutputStream::Append(), AppM, indented_output_stream, and tree_helper::PrintType().

|
virtual |
Initialize data structure.
Definition at line 87 of file instruction_writer.cpp.
|
virtual |
Write a statement.
| function_behavior | is the function to which the statement belongs |
| statement | is the statement to be printed |
| varFunctor | is the variable functor |
Definition at line 91 of file instruction_writer.cpp.
References IndentedOutputStream::Append(), FunctionBehavior::CFG, FunctionBehavior::CGetBehavioralHelper(), FunctionBehavior::CGetOpGraph(), indented_output_stream, and BehavioralHelper::print_vertex().

|
virtual |
Write code needed for declaration/initialization of auxiliary variables.
Definition at line 112 of file instruction_writer.cpp.
| void InstructionWriter::WriteComment | ( | const std::string & | text | ) |
Writes a comment.
| comment | is the string to be printed |
Definition at line 116 of file instruction_writer.cpp.
References IndentedOutputStream::Append(), and indented_output_stream.

|
protected |
The application manager.
Definition at line 72 of file instruction_writer.hpp.
Referenced by discrepancy_instruction_writer::declareFunction(), HLSInstructionWriter::declareFunction(), and declareFunction().
|
protected |
The debug level.
Definition at line 81 of file instruction_writer.hpp.
Referenced by InstructionWriter().
|
protected |
The indented output stream.
Definition at line 75 of file instruction_writer.hpp.
Referenced by HLSInstructionWriter::declareFunction(), declareFunction(), write(), and WriteComment().
|
protected |
The set of input parameters.
Definition at line 78 of file instruction_writer.hpp.
Referenced by InstructionWriter().
1.8.13