Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
loomc_pass_trace_options_t Struct Reference

Pass trace options for one pipeline or compile invocation. More...

#include <pass_trace.h>

Data Fields

loomc_structure_type_t type
 Structure type. Must be LOOMC_STRUCTURE_TYPE_PASS_TRACE_OPTIONS.
loomc_host_size_t structure_size
 Size of this structure in bytes.
const void * next
 Next invocation option extension.
loomc_pass_trace_format_t format
 Formatted representation written to sink.
loomc_pass_trace_flags_t flags
 Boundary selection flags.
loomc_string_view_t tool_name
 Tool identity included in event metadata.
loomc_string_view_t input_identifier
 Input identity included in event metadata.
const loomc_string_view_t * before_filters
 Pass keys, pipeline symbols, or stage names traced before invocation.
loomc_host_size_t before_filter_count
 Number of entries in before_filters.
const loomc_string_view_t * after_filters
 Pass keys, pipeline symbols, or stage names traced after invocation.
loomc_host_size_t after_filter_count
 Number of entries in after_filters.
loomc_pass_trace_sink_t sink
 Destination receiving the complete formatted trace in order.
loomc_pass_trace_artifact_sink_t artifact_sink
 Optional destinations for per-event textual IR snapshots.

Detailed Description

Pass trace options for one pipeline or compile invocation.

Attach this descriptor to loomc_pass_run_options_t::next or loomc_compile_options_t::next or loomc_compile_artifact_options_t::next. Before and after filters match a pass key, an authored pass.pipeline symbol, or the compiler-defined stage name. The compiler supplies stage names and target-aware textual assembly; callers do not reconstruct either from internal compiler state.

The descriptor and every borrowed string remain live only for the synchronous compile call. The write callback may be invoked many times and must preserve fragment order.

Field Documentation

◆ artifact_sink

loomc_pass_trace_artifact_sink_t loomc_pass_trace_options_t::artifact_sink

Optional destinations for per-event textual IR snapshots.

When open and close are NULL, the sequential trace embeds each selected snapshot inline. When both are present, the sequential trace records the artifact reference and the artifact sink receives the corresponding snapshot without buffering in Loom.

◆ before_filters

const loomc_string_view_t* loomc_pass_trace_options_t::before_filters

Pass keys, pipeline symbols, or stage names traced before invocation.

Compiler-defined stages are pipeline-text for textual and empty pass programs, pipeline-symbol for authored pipeline symbols, source-low for source-to-low target programs, and prepared-low for complete target artifact programs.

◆ input_identifier

loomc_string_view_t loomc_pass_trace_options_t::input_identifier

Input identity included in event metadata.

Empty uses the format's unknown-value representation.

◆ tool_name

loomc_string_view_t loomc_pass_trace_options_t::tool_name

Tool identity included in event metadata.

Empty uses the format's unknown-value representation.


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