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

Control-flow graph edge data type. More...

#include "cfg.h"

Public Member Functions

 Edge (std::shared_ptr< InstructionSequence > source, std::shared_ptr< InstructionSequence > target, EdgeKind kind)
 Constructor. More...
 
EdgeKind get_kind () const
 Get the EdgeKind of this Edge. More...
 
std::shared_ptr< InstructionSequenceget_source () const
 Get the source basic block. More...
 
std::shared_ptr< InstructionSequenceget_target () const
 Get the target basic block. More...
 

Detailed Description

Control-flow graph edge data type.

An Edge is a predecessor/successor connection between a source basic block and a target basic block.

Constructor & Destructor Documentation

◆ Edge()

Edge::Edge ( std::shared_ptr< InstructionSequence source,
std::shared_ptr< InstructionSequence target,
EdgeKind  kind 
)

Constructor.

Parameters
sourcethe source basic block
targetthe target basic block
EdgeKindthe kind of control edge

Member Function Documentation

◆ get_kind()

EdgeKind Edge::get_kind ( ) const
inline

Get the EdgeKind of this Edge.

Returns
the EdgeKind of this Edge

◆ get_source()

std::shared_ptr<InstructionSequence> Edge::get_source ( ) const
inline

Get the source basic block.

Returns
the source basic block

◆ get_target()

std::shared_ptr<InstructionSequence> Edge::get_target ( ) const
inline

Get the target basic block.

Returns
the target basic block

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