From 455820fc8438ab72c963ef354b9e32f6e5af1e65 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Mon, 5 Sep 2016 18:42:42 +0100 Subject: Speed up SSA generation and clang compilation --- src/codegen/codegen.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/codegen/codegen.cpp') diff --git a/src/codegen/codegen.cpp b/src/codegen/codegen.cpp index a583af2c8..7ad1d56e2 100644 --- a/src/codegen/codegen.cpp +++ b/src/codegen/codegen.cpp @@ -118,6 +118,7 @@ void ssa_gen_tree(ssaGen *s) { } if (are_strings_equal(name, original_name)) { + #if 0 Scope *scope = *map_get(&info->scopes, hash_pointer(pd->type)); isize count = multi_map_count(&scope->elements, hash_string(original_name)); if (count > 1) { @@ -127,6 +128,7 @@ void ssa_gen_tree(ssaGen *s) { name_len = gb_snprintf(cast(char *)name_text, name_len, "%.*s$%d", LIT(name), e->guid); name = make_string(name_text, name_len-1); } + #endif } ssaValue *p = ssa_make_value_procedure(a, m, e->type, decl->type_expr, body, name); @@ -208,5 +210,9 @@ void ssa_gen_tree(ssaGen *s) { void ssa_gen_ir(ssaGen *s) { - ssa_print_llvm_ir(&s->output_file, &s->module); + ssaFileBuffer buf = {}; + ssa_file_buffer_init(&buf, &s->output_file); + defer (ssa_file_buffer_destroy(&buf)); + + ssa_print_llvm_ir(&buf, &s->module); } -- cgit v1.2.3