7#ifndef LOOMC_INTEROP_H_
8#define LOOMC_INTEROP_H_
10#include "loom/error/renderer.h"
11#include "loom/error/source.h"
12#include "loom/ir/module.h"
13#include "loom/pass/registry.h"
14#include "loom/pass/report.h"
15#include "loom/target/pipeline.h"
16#include "loom/target/provider.h"
17#include "loom/target/reporting/report.h"
118 loom_pass_registry_storage_t* out_storage);
145 loomc_context_t* context, loom_target_pipeline_build_fn_t build_pipeline,
#define LOOMC_API_EXPORT
Exports a public Loom C API symbol from a shared library build.
Definition base.h:34
size_t loomc_host_size_t
Host allocation and container size type.
Definition base.h:45
loomc_structure_type_t
Structure type values used by extensible public descriptors.
Definition base.h:181
struct iree_status_handle_t * loomc_status_t
Opaque status handle.
Definition base.h:55
Prepared compilers and module compilation.
struct loomc_context_t loomc_context_t
Immutable Loom API context.
Definition context.h:63
loomc_status_t loomc_target_environment_create_from_provider_set(const loom_target_provider_set_t *provider_set, loomc_allocator_t allocator, loomc_target_environment_t **out_target_environment)
Creates a public target environment from exact-version native providers.
loomc_module_mutable_interop_view_t loomc_module_get_mutable_interop_view(loomc_module_t *module)
Projects a mutable native view after invalidating derived module state.
const loom_target_profile_t * loomc_target_profile_get_interop_view(const loomc_target_profile_t *target_profile)
Returns the immutable native profile owned by a public target handle.
loomc_status_t loomc_pass_program_create_from_native_source_low_pipeline(loomc_context_t *context, loom_target_pipeline_build_fn_t build_pipeline, loomc_string_view_t identifier, const loom_target_pipeline_options_t *options, loomc_allocator_t allocator, loomc_pass_program_t **out_pass_program, loomc_result_t **out_result)
Creates a public pass program from a native source-Low pipeline builder.
loomc_status_t loomc_target_environment_get_native_pass_registry(const loomc_target_environment_t *target_environment, loom_pass_registry_storage_t *out_storage)
Composes builtin and target pass descriptors for exact-version inspection.
const loom_target_environment_t * loomc_target_environment_get_interop_view(const loomc_target_environment_t *target_environment)
Returns the immutable native environment owned by a public target handle.
loomc_status_t loomc_module_get_interop_view(loomc_module_t *module, loomc_allocator_t allocator, loomc_module_interop_view_t *out_view, loomc_result_t **out_result)
Verifies a public module and projects its native read-only view.
Opaque in-memory Loom modules.
struct loomc_module_t loomc_module_t
Opaque parsed, linked, optimized, or lowered module.
Definition module.h:90
struct loomc_pass_program_t loomc_pass_program_t
Prepared immutable pass program.
Definition pass.h:88
Shared operation result container.
struct loomc_result_t loomc_result_t
Immutable operation result.
Definition result.h:71
Host allocator used for persistent Loom object storage.
Definition base.h:414
Read-only native projection of a structurally verified LoomC module.
Definition interop.h:42
const loom_source_table_resolver_t * source_table
Exact source snapshots indexed by native module source ID.
Definition interop.h:47
loom_type_formatter_t type_formatter
Formats native types using the module's strings and descriptors without requiring consumers to link t...
Definition interop.h:54
const loom_module_t * module
Native module owned by the public module handle.
Definition interop.h:44
Mutable native projection of a LoomC module for exact-version producers.
Definition interop.h:67
loom_module_t * module
Mutable native module owned by the public module handle.
Definition interop.h:69
const loom_source_table_resolver_t * source_table
Exact source snapshots indexed by native module source ID.
Definition interop.h:72
Collects target compilation details during prepared execution.
Definition interop.h:197
loomc_host_size_t structure_size
Size of this structure in bytes.
Definition interop.h:202
const void * next
Next invocation option extension.
Definition interop.h:205
loom_target_compile_report_t * report
Initialized caller-owned collector. Must not be NULL.
Definition interop.h:208
loomc_structure_type_t type
Must be LOOMC_STRUCTURE_TYPE_NATIVE_COMPILE_REPORT_OPTIONS.
Definition interop.h:199
Collects native pass invocation records during prepared execution.
Definition interop.h:166
const void * next
Next invocation option extension.
Definition interop.h:174
loom_pass_report_t * report
Initialized caller-owned collector. Must not be NULL.
Definition interop.h:177
loomc_structure_type_t type
Must be LOOMC_STRUCTURE_TYPE_NATIVE_PASS_REPORT_OPTIONS.
Definition interop.h:168
loomc_host_size_t structure_size
Size of this structure in bytes.
Definition interop.h:171
Non-owning string view over bytes that need not be NUL-terminated.
Definition base.h:63
Prepared target environments and target lowering pipelines.
struct loomc_target_environment_t loomc_target_environment_t
Prepared immutable target environment.
Definition target.h:124
struct loomc_target_profile_t loomc_target_profile_t
Prepared immutable target profile.
Definition target.h:136