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

Lowered IR for one function or top-level body. More...

#include <Compiler_IR_Model.H>

Collaboration diagram for Aleph::Compiler_IR_Function:
[legend]

Public Member Functions

bool is_top_level () const noexcept
 Returns whether this IR function represents the top-level body.
 

Public Attributes

Compiler_IR_Function_Id id = compiler_ir_invalid_id()
 Stable function id within the module.
 
std::string name
 Debug or source-level name.
 
Source_Span span
 Source span of the function/body.
 
Compiler_Type_Id type_id = 0
 Full function type, when known.
 
const Compiler_HIR_Function * source_function = nullptr
 Originating HIR function, or nullptr for top-level.
 
DynArray< Compiler_IR_Slot > local_slots
 Parameter/local slots in stable order.
 
DynArray< Compiler_IR_Block > blocks
 Basic blocks in deterministic id order.
 
Compiler_IR_Block_Id entry_block = compiler_ir_invalid_id()
 Canonical entry block.
 
Compiler_IR_Block_Id exit_block = compiler_ir_invalid_id()
 Canonical exit block.
 
Compiler_IR_Value_Id next_value_id = 0
 Next value id to allocate while lowering.
 

Detailed Description

Lowered IR for one function or top-level body.

Definition at line 226 of file Compiler_IR_Model.H.

Member Function Documentation

◆ is_top_level()

bool Aleph::Compiler_IR_Function::is_top_level ( ) const
inlinenoexcept

Returns whether this IR function represents the top-level body.

Definition at line 241 of file Compiler_IR_Model.H.

References source_function.

Referenced by Aleph::Compiler_IR_Lowering::Module_Builder::lower_stmt().

Member Data Documentation

◆ blocks

◆ entry_block

◆ exit_block

◆ id

◆ local_slots

◆ name

◆ next_value_id

◆ source_function

const Compiler_HIR_Function* Aleph::Compiler_IR_Function::source_function = nullptr

◆ span

◆ type_id


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