|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
CFG representation of a single function or top-level body. More...
#include <Compiler_CFG.H>
Public Member Functions | |
| bool | is_top_level () const noexcept |
| Checks if this CFG represents the global top-level script. | |
Public Attributes | |
| std::string | name |
| Function or script name. | |
| Source_Span | span |
| Overall source span. | |
| Compiler_Type_Id | type_id = 0 |
| Return type or function type ID. | |
| const Compiler_HIR_Function * | source_function = nullptr |
| Pointer to original HIR (null for top-level). | |
| DynArray< Compiler_CFG_Block > | blocks |
| All basic blocks belonging to this function. | |
| Compiler_CFG_Block_Id | entry_block = compiler_cfg_invalid_block_id() |
| Starting block ID. | |
| Compiler_CFG_Block_Id | exit_block = compiler_cfg_invalid_block_id() |
| Canonical exit block ID. | |
CFG representation of a single function or top-level body.
Organizes basic blocks into a directed graph.
Definition at line 162 of file Compiler_CFG.H.
|
inlinenoexcept |
Checks if this CFG represents the global top-level script.
Definition at line 173 of file Compiler_CFG.H.
References source_function.
| DynArray<Compiler_CFG_Block> Aleph::Compiler_CFG_Function::blocks |
All basic blocks belonging to this function.
Definition at line 168 of file Compiler_CFG.H.
Referenced by Aleph::Compiler_CFG_Lowering::block(), Aleph::compiler_dump_cfg_function(), Aleph::Compiler_CFG_Lowering::create_block(), TEST(), and Aleph::validate_cfg_function().
| Compiler_CFG_Block_Id Aleph::Compiler_CFG_Function::entry_block = compiler_cfg_invalid_block_id() |
Starting block ID.
Definition at line 169 of file Compiler_CFG.H.
Referenced by Aleph::compiler_dump_cfg_function(), Aleph::Compiler_CFG_Lowering::lower_statement_sequence(), TEST(), and Aleph::validate_cfg_function().
| Compiler_CFG_Block_Id Aleph::Compiler_CFG_Function::exit_block = compiler_cfg_invalid_block_id() |
Canonical exit block ID.
Definition at line 170 of file Compiler_CFG.H.
Referenced by Aleph::compiler_dump_cfg_function(), Aleph::Compiler_CFG_Lowering::lower_statement_sequence(), TEST(), and Aleph::validate_cfg_function().
| std::string Aleph::Compiler_CFG_Function::name |
Function or script name.
Definition at line 164 of file Compiler_CFG.H.
Referenced by Aleph::compiler_dump_cfg_function(), Aleph::Compiler_CFG_Lowering::lower_statement_sequence(), TEST(), and Aleph::validate_cfg_function().
| const Compiler_HIR_Function* Aleph::Compiler_CFG_Function::source_function = nullptr |
Pointer to original HIR (null for top-level).
Definition at line 167 of file Compiler_CFG.H.
Referenced by is_top_level(), and Aleph::Compiler_CFG_Lowering::lower_statement_sequence().
| Source_Span Aleph::Compiler_CFG_Function::span |
Overall source span.
Definition at line 165 of file Compiler_CFG.H.
Referenced by Aleph::Compiler_CFG_Lowering::lower_statement_sequence(), and Aleph::Compiler_CFG_Lowering::lower_stmt().
| Compiler_Type_Id Aleph::Compiler_CFG_Function::type_id = 0 |
Return type or function type ID.
Definition at line 166 of file Compiler_CFG.H.
Referenced by Aleph::compiler_dump_cfg_function(), and Aleph::Compiler_CFG_Lowering::lower_statement_sequence().