41 #ifndef EDGE_C_WRITER_HPP 42 #define EDGE_C_WRITER_HPP 116 virtual void print_end_path(
unsigned int fun_id,
unsigned int loop_id);
169 const std::map<unsigned int, std::map<unsigned int, unsigned int>>&
CGetFunctionLoopToId()
const;
std::map< vertex, EdgeDescriptor > local_inc
Increment which should be added before the label in a basic block.
virtual void print_loop_escaping(EdgeDescriptor e)
Dump operations requested for record information about a path which exit from a loop.
virtual void print_end_path(unsigned int fun_id, unsigned int loop_id)
Print operations needed to store into symbol table information about last path.
unsigned int counter
The size of fun_loop_to_index.
const std::map< unsigned int, std::map< unsigned int, unsigned int > > & CGetFunctionLoopToId() const
Returns the map which associates to each loop a unique id.
Class used to write the C code representing a program, this class can't be directly instantiated sinc...
Class specification of the graph structures.
std::map< unsigned int, std::map< unsigned int, unsigned int > > fun_loop_to_index
Map a pair function - loop to an unique index.
unsigned int fun_id
Index of the current function.
bool verbose
Verbosity means that a comment is printed for each line in the output file.
BBGraphConstRef support_cfg
Special control flow graphs.
virtual void print_loop_starting(EdgeDescriptor e)
Dump initializations of variable for recording a loop path.
A set of operation vertices.
Class use to write the C code with instrumented edges.
const IndentedOutputStreamRef indented_output_stream
Represents the stream we are currently writing to.
virtual void WriteHeader() override
Writes the header of the file.
const ParameterConstRef Param
set of parameters
CONSTREF_FORWARD_DECL(application_manager)
void writeRoutineInstructions_rec(vertex current_vertex, bool bracket)
Write recursively instructions belonging to a basic block of task or of a function.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
virtual ~EdgeCWriter() override
EdgeCWriter(const HLS_managerConstRef _HLSMgr, const InstructionWriterRef instruction_writer, const IndentedOutputStreamRef indented_output_stream, const ParameterConstRef Param, bool verbose=true)
Constructor of the class.
void writeRoutineInstructions(const unsigned int function_index, const OpVertexSet &instructions, const var_pp_functorConstRef variableFunctor, vertex bb_start=NULL_VERTEX, CustomOrderedSet< vertex > bb_end=CustomOrderedSet< vertex >()) override
Writes the instructions of the current routine, being it a task or a function of the original program...
Template definition of refcount.
std::set< EdgeDescriptor, ltedge< BBGraph > > dumped_edges
Set of already dumped edges.
virtual void print_edge(EdgeDescriptor e, unsigned int index)
Dump operation requested for instrument an edges.
Class specification of the basic_block structure.
virtual void print_loop_ending(EdgeDescriptor e)
Dump operations requested for record information about a loop path which ends.
virtual void print_loop_switching(EdgeDescriptor e)
Print operation requested for record information about a path which exit from a loop and immediately ...
This file contains the routines necessary to create a C executable program.
Class used to describe a particular graph with operations as nodes.
virtual void Initialize() override
Initialize data structure.
#define NULL_VERTEX
null vertex definition
boost::graph_traits< graph >::edge_descriptor EdgeDescriptor
edge definition.