Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Compiler_CFG_Detail Namespace Reference

Functions

std::string block_name (const Compiler_CFG_Block_Id id)
 Generates a standard block label (e.g., "B0").
 
bool contains_block_id (const DynArray< Compiler_CFG_Block_Id > &ids, const Compiler_CFG_Block_Id id) noexcept
 Checks if a block ID is present in a list of IDs.
 
void append_indented_text (std::ostream &out, const std::string &text, const size_t indent)
 Appends text to a stream with a consistent indentation.
 
void append_hir_stmt_dump (std::ostream &out, const Compiler_HIR_Stmt *stmt, const Compiler_Type_Context *types, const size_t indent)
 Dumps a HIR statement to the stream for debugging.
 
void append_hir_expr_dump (std::ostream &out, const Compiler_HIR_Expr *expr, const Compiler_Type_Context *types, const size_t indent)
 Dumps a HIR expression to the stream for debugging.
 
bool is_linear_stmt (const Compiler_HIR_Stmt *stmt) noexcept
 Checks if an HIR statement is linear (non-branching).
 

Function Documentation

◆ append_hir_expr_dump()

void Aleph::Compiler_CFG_Detail::append_hir_expr_dump ( std::ostream &  out,
const Compiler_HIR_Expr *  expr,
const Compiler_Type_Context *  types,
const size_t  indent 
)
inline

Dumps a HIR expression to the stream for debugging.

Definition at line 316 of file Compiler_CFG.H.

References append_indented_text(), Aleph::blossom_maximum_cardinality_matching(), Aleph::compiler_dump_hir_expr(), and out.

Referenced by Aleph::compiler_dump_cfg_function().

◆ append_hir_stmt_dump()

void Aleph::Compiler_CFG_Detail::append_hir_stmt_dump ( std::ostream &  out,
const Compiler_HIR_Stmt *  stmt,
const Compiler_Type_Context *  types,
const size_t  indent 
)
inline

Dumps a HIR statement to the stream for debugging.

Definition at line 301 of file Compiler_CFG.H.

References append_indented_text(), Aleph::blossom_maximum_cardinality_matching(), Aleph::compiler_dump_hir_stmt(), and out.

Referenced by Aleph::compiler_dump_cfg_function().

◆ append_indented_text()

void Aleph::Compiler_CFG_Detail::append_indented_text ( std::ostream &  out,
const std::string &  text,
const size_t  indent 
)
inline

Appends text to a stream with a consistent indentation.

Definition at line 279 of file Compiler_CFG.H.

References Aleph::blossom_maximum_cardinality_matching(), and out.

Referenced by append_hir_expr_dump(), append_hir_stmt_dump(), and Aleph::compiler_dump_cfg_module().

◆ block_name()

std::string Aleph::Compiler_CFG_Detail::block_name ( const Compiler_CFG_Block_Id  id)
inline

Generates a standard block label (e.g., "B0").

Definition at line 263 of file Compiler_CFG.H.

Referenced by Aleph::compiler_dump_cfg_function(), and Aleph::validate_cfg_function().

◆ contains_block_id()

bool Aleph::Compiler_CFG_Detail::contains_block_id ( const DynArray< Compiler_CFG_Block_Id > &  ids,
const Compiler_CFG_Block_Id  id 
)
inlinenoexcept

Checks if a block ID is present in a list of IDs.

Definition at line 269 of file Compiler_CFG.H.

References Aleph::blossom_maximum_cardinality_matching().

Referenced by Aleph::Compiler_CFG_Lowering::add_edge(), and Aleph::validate_cfg_function().

◆ is_linear_stmt()

bool Aleph::Compiler_CFG_Detail::is_linear_stmt ( const Compiler_HIR_Stmt *  stmt)
inlinenoexcept

Checks if an HIR statement is linear (non-branching).

Definition at line 331 of file Compiler_CFG.H.

References Aleph::blossom_maximum_cardinality_matching(), Aleph::Eval, Aleph::Invalid, and Aleph::Let.

Referenced by Aleph::Compiler_CFG_Lowering::lower_stmt().