[goalc] register allocator v2 (#731)

* clean up allocator interface to be simpler

* working on functions without spills

* working for all

* fix missing includes for windows

* more windows includes

* initialize regs to zero so printing value unintiailized by game code is repeatable
This commit is contained in:
water111
2021-08-01 17:46:55 -04:00
committed by GitHub
parent b8f80e435c
commit aa58d146c2
29 changed files with 2314 additions and 949 deletions
@@ -603,5 +603,21 @@ Val* Compiler::compile_make(const goos::Object& form, const goos::Object& rest,
}
m_make.make(args.unnamed.at(0).as_string()->data, force, verbose);
return get_none();
}
Val* Compiler::compile_print_debug_compiler_stats(const goos::Object& form,
const goos::Object& rest,
Env*) {
auto args = get_va(form, rest);
va_check(form, args, {}, {});
fmt::print("Spill operations (total): {}\n", m_debug_stats.num_spills);
fmt::print("Spill operations (v1 only): {}\n", m_debug_stats.num_spills_v1);
fmt::print("Eliminated moves: {}\n", m_debug_stats.num_moves_eliminated);
fmt::print("Total functions: {}\n", m_debug_stats.total_funcs);
fmt::print("Functions requiring v1: {}\n", m_debug_stats.funcs_requiring_v1_allocator);
fmt::print("Size of autocomplete prefix tree: {}\n", m_symbol_info.symbol_count());
return get_none();
}