Nearly CC
An educational compiler skeleton
Public Member Functions | Public Attributes | List of all members
DataflowAnnotator< DataflowType > Class Template Reference

Annotator to return a stringified dataflow fact for a specific instruction in a basic block. More...

#include "dataflow.h"

Public Member Functions

 DataflowAnnotator (DataflowType &dataflow)
 Constructor. More...
 
std::string get_instruction_annotation (std::shared_ptr< InstructionSequence > bb, Instruction *ins) const
 
virtual std::string get_block_begin_annotation (std::shared_ptr< InstructionSequence > bb) const
 Get a begin annotation for a basic block. More...
 
virtual std::string get_block_end_annotation (std::shared_ptr< InstructionSequence > bb) const
 Get an end annotation for a basic block. More...
 

Public Attributes

DataflowType & m_dataflow
 

Detailed Description

template<typename DataflowType>
class DataflowAnnotator< DataflowType >

Annotator to return a stringified dataflow fact for a specific instruction in a basic block.

This can be used with ControlFlowGraphPrinter to annotate the printed control-flow graph with dataflow facts.

Template Parameters
thetype of the Dataflow object containing the analysis results

Constructor & Destructor Documentation

◆ DataflowAnnotator()

template<typename DataflowType >
DataflowAnnotator< DataflowType >::DataflowAnnotator ( DataflowType &  dataflow)
inline

Constructor.

Parameters
referenceto the Dataflow object containing the analysis results

Member Function Documentation

◆ get_block_begin_annotation()

template<typename DataflowType >
virtual std::string DataflowAnnotator< DataflowType >::get_block_begin_annotation ( std::shared_ptr< InstructionSequence bb) const
inlinevirtual

Get a begin annotation for a basic block.

This will return a textual representation of the dataflow fact at the beginning of the basic block.

Parameters
bbthe basic block
Returns
stringified dataflow fact at the beginning of the basic block

◆ get_block_end_annotation()

template<typename DataflowType >
virtual std::string DataflowAnnotator< DataflowType >::get_block_end_annotation ( std::shared_ptr< InstructionSequence bb) const
inlinevirtual

Get an end annotation for a basic block.

This will return a textual representation of the dataflow fact at the end of the basic block.

Parameters
bbthe basic block
Returns
stringified dataflow fact at the end of the basic block

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