Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions xls/dslx/ir_convert/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,13 @@ cc_library(
srcs = ["ir_conversion_utils.cc"],
hdrs = ["ir_conversion_utils.h"],
deps = [
"//xls/common/status:ret_check",
"//xls/common/status:status_macros",
"//xls/dslx:interp_value",
"//xls/dslx/frontend:ast",
"//xls/dslx/type_system:parametric_env",
"//xls/dslx/type_system:type",
"//xls/dslx/type_system:type_info",
"//xls/ir",
"//xls/ir:type",
"@com_google_absl//absl/log",
Expand Down Expand Up @@ -352,6 +355,7 @@ cc_library(
"//xls/dslx/type_system:parametric_env",
"//xls/dslx/type_system:type",
"//xls/dslx/type_system:type_info",
"//xls/dslx/type_system_v2:import_utils",
"//xls/ir",
"//xls/ir:bits",
"//xls/ir:channel",
Expand Down Expand Up @@ -415,6 +419,7 @@ cc_library(
":extract_conversion_order",
":function_converter",
":get_conversion_records",
":ir_conversion_utils",
":proc_config_ir_converter",
"//xls/common/status:ret_check",
"//xls/common/status:status_macros",
Expand All @@ -437,13 +442,15 @@ cc_library(
"//xls/dslx/frontend:scanner",
"//xls/dslx/type_system:parametric_env",
"//xls/dslx/type_system:type_info",
"//xls/dslx/type_system_v2:import_utils",
"//xls/ir",
"//xls/ir:function_builder",
"//xls/ir:ir_scanner",
"//xls/ir:value",
"//xls/ir:verifier",
"//xls/ir:xls_ir_interface_cc_proto",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log",
Expand Down Expand Up @@ -515,6 +522,7 @@ cc_library(
hdrs = ["get_conversion_records.h"],
deps = [
":conversion_record",
":ir_conversion_utils",
"//xls/common/status:ret_check",
"//xls/common/status:status_macros",
"//xls/dslx:interp_value",
Expand Down
7 changes: 6 additions & 1 deletion xls/dslx/ir_convert/extract_conversion_order.cc
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ absl::StatusOr<std::vector<ConversionRecord>> GetOrder(Module* module,
}

absl::StatusOr<std::vector<ConversionRecord>> GetOrderForEntry(
std::variant<Function*, Proc*> entry, TypeInfo* type_info,
std::variant<Function*, Proc*, ProcDef*> entry, TypeInfo* type_info,
std::optional<ResolvedProcAlias> resolved_proc_alias) {
std::vector<ConversionRecord> ready;
if (std::holds_alternative<Function*>(entry)) {
Expand All @@ -835,6 +835,11 @@ absl::StatusOr<std::vector<ConversionRecord>> GetOrderForEntry(
return ready;
}

if (std::holds_alternative<ProcDef*>(entry)) {
return absl::UnimplementedError(
"Impl-style procs can only be compiled with proc-scoped channels.");
}

Proc* p = std::get<Proc*>(entry);
XLS_ASSIGN_OR_RETURN(TypeInfo * new_ti,
type_info->GetTopLevelProcTypeInfo(p));
Expand Down
2 changes: 1 addition & 1 deletion xls/dslx/ir_convert/extract_conversion_order.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ absl::StatusOr<std::vector<ConversionRecord>> GetOrder(
// f: The top level function.
// type_info: Mapping from node to type.
absl::StatusOr<std::vector<ConversionRecord>> GetOrderForEntry(
std::variant<Function*, Proc*> entry, TypeInfo* type_info,
std::variant<Function*, Proc*, ProcDef*> entry, TypeInfo* type_info,
std::optional<ResolvedProcAlias> resolved_proc_alias = std::nullopt);

// Top level procs are procs where their config or next function is not invoked
Expand Down
Loading
Loading