From acd0979db629d8446a18e997c7eb576a440dca53 Mon Sep 17 00:00:00 2001 From: Shaw Summa Date: Sun, 19 May 2024 10:00:56 -0400 Subject: [PATCH] switch back to -O2 --- vm/backend/exec.c | 4 ++-- vm/backend/tb_dyn.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/vm/backend/exec.c b/vm/backend/exec.c index 81e099bf..7565b9b6 100644 --- a/vm/backend/exec.c +++ b/vm/backend/exec.c @@ -108,8 +108,8 @@ void *vm_cache_comp(const char *comp, const char *flags, const char *src) { fwrite(src, len, 1, out); fclose(out); vm_io_buffer_t *cmd_buf = vm_io_buffer_new(); - // vm_io_buffer_format(cmd_buf, "%s -shared -O2 -foptimize-sibling-calls -fPIC %s %s -o %s -w -pipe", comp, flags, c_file, so_file); - vm_io_buffer_format(cmd_buf, "%s -shared -g3 -foptimize-sibling-calls -fPIC %s %s -o %s -w -pipe", comp, flags, c_file, so_file); + vm_io_buffer_format(cmd_buf, "%s -shared -O2 -foptimize-sibling-calls -fPIC %s %s -o %s -w -pipe", comp, flags, c_file, so_file); + // vm_io_buffer_format(cmd_buf, "%s -shared -g3 -foptimize-sibling-calls -fPIC %s %s -o %s -w -pipe", comp, flags, c_file, so_file); int res = system(cmd_buf->buf); if (res) { return NULL; diff --git a/vm/backend/tb_dyn.h b/vm/backend/tb_dyn.h index 3271ac72..aa668ffa 100644 --- a/vm/backend/tb_dyn.h +++ b/vm/backend/tb_dyn.h @@ -1306,6 +1306,9 @@ vm_tb_dyn_func_t *vm_tb_dyn_comp(vm_tb_dyn_state_t *state, vm_block_t *entry) { } } const char *buf = tb_c_buf_to_data(cbuf); + if (state->config->dump_c) { + printf("\n--- c ---\n%s", buf); + } const char *cc_name = NULL; switch (state->config->target) { case VM_TARGET_TB_CC: