Cache type size/align; Improve speed of ir_print.cpp

This commit is contained in:
gingerBill
2018-01-20 15:12:44 +00:00
parent 2fe660a1d7
commit 2e28c9d793
6 changed files with 103 additions and 227 deletions
+1 -1
View File
@@ -3051,7 +3051,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->sizes, c->allocator, e->type);
// i64 size = type_size_of(c->allocator, e->type);
i64 align = type_align_of(c->allocator, e->type);
if (align > 0) {
add_type_info_type(c, e->type);