Split up cycle check and adding type info timings

This commit is contained in:
gingerBill
2021-07-13 17:24:20 +01:00
parent 1877965ac3
commit 4ded42a33b

View File

@@ -4674,12 +4674,7 @@ void check_parsed_files(Checker *c) {
for_array(i, c->info.definitions) {
Entity *e = c->info.definitions[i];
if (e->kind == Entity_TypeName && e->type != nullptr) {
// i64 size = type_size_of(c->allocator, e->type);
i64 align = type_align_of(e->type);
if (align > 0 && ptr_set_exists(&c->info.minimum_dependency_set, e)) {
add_type_info_type(&c->builtin_ctx, e->type);
}
(void)type_align_of(e->type);
} else if (e->kind == Entity_Procedure) {
DeclInfo *decl = e->decl_info;
ast_node(pl, ProcLit, decl->proc_lit);
@@ -4694,6 +4689,16 @@ void check_parsed_files(Checker *c) {
}
}
}
TIME_SECTION("add type info for type definitions");
for_array(i, c->info.definitions) {
Entity *e = c->info.definitions[i];
if (e->kind == Entity_TypeName && e->type != nullptr) {
i64 align = type_align_of(e->type);
if (align > 0 && ptr_set_exists(&c->info.minimum_dependency_set, e)) {
add_type_info_type(&c->builtin_ctx, e->type);
}
}
}
TIME_SECTION("check deferred procedures");
for (Entity *src = nullptr; mpmc_dequeue(&c->procs_with_deferred_to_check, &src); /**/) {