Nearly CC
An educational compiler skeleton
Classes | Functions
cfg_builder.h File Reference

Support for building a ControlFlowGraph from an InstructionSequence. More...

#include "cfg.h"
#include "highlevel.h"
#include "lowlevel.h"
Include dependency graph for cfg_builder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ControlFlowGraphBuilder< InstructionProperties >
 ControlFlowGraphBuilder builds a ControlFlowGraph from an InstructionSequence. More...
 

Functions

ControlFlowGraphBuilder< HighLevelInstructionPropertiesmake_highlevel_cfg_builder (const std::shared_ptr< InstructionSequence > &iseq)
 Return a ControlFlowGraphBuilder for building a high-level ControlFlowGraph. More...
 
ControlFlowGraphBuilder< LowLevelInstructionPropertiesmake_lowlevel_cfg_builder (const std::shared_ptr< InstructionSequence > &iseq)
 Return a ControlFlowGraphBuilder for building a low-level ControlFlowGraph. More...
 

Detailed Description

Support for building a ControlFlowGraph from an InstructionSequence.

Function Documentation

◆ make_highlevel_cfg_builder()

ControlFlowGraphBuilder<HighLevelInstructionProperties> make_highlevel_cfg_builder ( const std::shared_ptr< InstructionSequence > &  iseq)
inline

Return a ControlFlowGraphBuilder for building a high-level ControlFlowGraph.

Example usage:

auto hl_cfg_builder = ::make_highlevel_cfg_builder(hl_iseq);
ControlFlowGraphBuilder< HighLevelInstructionProperties > make_highlevel_cfg_builder(const std::shared_ptr< InstructionSequence > &iseq)
Return a ControlFlowGraphBuilder for building a high-level ControlFlowGraph.
Definition: cfg_builder.h:104
Parameters
theInstructionSequence containing the high-level instructions
Returns
a shared pointer to the resulting ControlFlowGraph

◆ make_lowlevel_cfg_builder()

ControlFlowGraphBuilder<LowLevelInstructionProperties> make_lowlevel_cfg_builder ( const std::shared_ptr< InstructionSequence > &  iseq)
inline

Return a ControlFlowGraphBuilder for building a low-level ControlFlowGraph.

Example usage:

auto ll_cfg_builder = ::make_lowlevel_cfg_builder(ll_iseq);
ControlFlowGraphBuilder< LowLevelInstructionProperties > make_lowlevel_cfg_builder(const std::shared_ptr< InstructionSequence > &iseq)
Return a ControlFlowGraphBuilder for building a low-level ControlFlowGraph.
Definition: cfg_builder.h:119
Parameters
theInstructionSequence containing the low-level instructions
Returns
a shared pointer to the resulting ControlFlowGraph