Nearly CC
An educational compiler skeleton
Public Member Functions | List of all members
DefaultBlockAnnotator Class Reference

Default annotator for printing a control flow graph. More...

#include "cfg_printer.h"

Inheritance diagram for DefaultBlockAnnotator:
Inheritance graph
[legend]
Collaboration diagram for DefaultBlockAnnotator:
Collaboration graph
[legend]

Public Member Functions

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...
 
std::string get_instruction_annotation (std::shared_ptr< InstructionSequence > iseq, Instruction *ins) const
 

Detailed Description

Default annotator for printing a control flow graph.

Uses DefaultInstructionAnnotator for instruction annotations, and returns empty begin and end annotations for basic blocks.

Member Function Documentation

◆ get_block_begin_annotation()

virtual std::string DefaultBlockAnnotator::get_block_begin_annotation ( std::shared_ptr< InstructionSequence bb) const
inlinevirtual

Get a begin annotation for a basic block.

For example, this could be overridden to return a textual representation of the dataflow fact at the beginning of the basic block.

Parameters
bbthe basic block
Returns
the annotation for the beginning of the basic block

◆ get_block_end_annotation()

virtual std::string DefaultBlockAnnotator::get_block_end_annotation ( std::shared_ptr< InstructionSequence bb) const
inlinevirtual

Get an end annotation for a basic block.

For example, this could be overridden to return a textual representation of the dataflow fact at the end of the basic block.

Parameters
bbthe basic block
Returns
the annotation for the end of the basic block

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