Skip to content

Commit

Permalink
issue #169 preparation for ravicomp integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyendumajumdar committed Aug 28, 2020
1 parent e20df09 commit 430f9a5
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/ravi_mirjit.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ MIR_module_t mir_compile_C_module(
char module_name[30];
struct ReadBuffer read_buffer = {.Current_char = 0, .Source_code = inputbuffer};
MIR_module_t module = NULL;
c2mir_init(ctx);
options->module_num++;
snprintf(module_name, sizeof module_name, "__mod_%lld__", options->module_num);
options->message_file = stderr;
Expand All @@ -401,14 +400,9 @@ MIR_module_t mir_compile_C_module(
}
if (ret_code == 0 && module) {
MIR_load_module (ctx, module);
MIR_gen_init (ctx);
MIR_gen_set_optimize_level(ctx, 2);
MIR_link (ctx, MIR_set_gen_interface, Import_resolver_func);
fun_addr = MIR_gen (ctx, main_func);
MIR_gen_finish (ctx);
}
c2mir_finish (ctx);
return fun_addr;
return ret_code == 0 && module ? module : NULL;
}

void *mir_get_func(MIR_context_t ctx, MIR_module_t module, const char *func_name) {
Expand Down

0 comments on commit 430f9a5

Please sign in to comment.