gboolean try_llvm;
gboolean llvm;
gboolean llvm_only;
- gboolean llvm_disable_self_init;
int nthreads;
int ntrampolines;
int nrgctx_trampolines;
} else {
if (!acfg->aot_opts.direct_extern_calls)
return FALSE;
- if (!acfg->llvm || acfg->aot_opts.llvm_disable_self_init)
+ if (!acfg->llvm)
return FALSE;
if (acfg->aot_opts.soft_debug || acfg->aot_opts.no_direct_calls)
return FALSE;
if (direct_callable && (acfg->aot_opts.dedup || acfg->aot_opts.dedup_include) && mono_aot_can_dedup (patch_info->data.method))
direct_callable = FALSE;
- if (direct_callable && (!acfg->llvm || acfg->aot_opts.llvm_disable_self_init) && !(!callee_cfg->has_got_slots && mono_class_is_before_field_init (callee_cfg->method->klass)))
+ if (direct_callable && !acfg->llvm && !(!callee_cfg->has_got_slots && mono_class_is_before_field_init (callee_cfg->method->klass)))
direct_callable = FALSE;
if (direct_callable && !strcmp (callee_cfg->method->name, ".cctor"))
gboolean has_jitted_code;
gboolean static_link;
gboolean llvm_only;
- gboolean llvm_disable_self_init;
gboolean interp;
GHashTable *idx_to_lmethod;
GHashTable *idx_to_unbox_tramp;
}
/* Initialize the method if needed */
- if (cfg->compile_aot && !ctx->module->llvm_disable_self_init) {
+ if (cfg->compile_aot) {
/* Emit a location for the initialization code */
ctx->init_bb = gen_bb (ctx, "INIT_BB");
ctx->inited_bb = gen_bb (ctx, "INITED_BB");
}
/* Initialize the method if needed */
- if (cfg->compile_aot && !ctx->module->llvm_disable_self_init) {
+ if (cfg->compile_aot) {
// FIXME: Add more shared got entries
ctx->builder = create_builder (ctx);
LLVMPositionBuilderAtEnd (ctx->builder, ctx->init_bb);
gboolean static_link = (flags & LLVM_MODULE_FLAG_STATIC) ? 1 : 0;
gboolean llvm_only = (flags & LLVM_MODULE_FLAG_LLVM_ONLY) ? 1 : 0;
gboolean interp = (flags & LLVM_MODULE_FLAG_INTERP) ? 1 : 0;
- gboolean llvm_disable_self_init = mini_get_debug_options ()->llvm_disable_self_init;
/* Delete previous module */
g_hash_table_destroy (module->plt_entries);
module->emit_dwarf = emit_dwarf;
module->static_link = static_link;
module->llvm_only = llvm_only;
- module->llvm_disable_self_init = llvm_disable_self_init && !llvm_only; // llvm_only implies !llvm_disable_self_init
module->interp = interp;
/* The first few entries are reserved */
module->max_got_offset = initial_got_size;
MonoLLVMModule *module = &aot_module;
MonoMethod *method;
- if (module->llvm_disable_self_init)
- return;
-
/*
* Replace GOT entries for directly callable methods with the methods themselves.
* It would be easier to implement this by predefining all methods before compiling
static void
mono_llvm_nonnull_state_update (EmitContext *ctx, LLVMValueRef lcall, MonoMethod *call_method, LLVMValueRef *args, int num_params)
{
- if (!ctx->module->llvm_disable_self_init && mono_aot_can_specialize (call_method)) {
+ if (mono_aot_can_specialize (call_method)) {
int num_passed = LLVMGetNumArgOperands (lcall);
g_assert (num_params <= num_passed);
if (lmethod && LLVMTypeOf (callee) == LLVMTypeOf (lmethod)) {
mono_llvm_replace_uses_of (callee, lmethod);
- if (!module->llvm_disable_self_init && mono_aot_can_specialize (ji->data.method))
+ if (mono_aot_can_specialize (ji->data.method))
g_hash_table_insert (specializable, lmethod, ji->data.method);
mono_aot_mark_unused_llvm_plt_entry (ji);
}
mini_debug_options.gdb = TRUE;
else if (!strcmp (option, "lldb"))
mini_debug_options.lldb = TRUE;
- else if (!strcmp (option, "llvm-disable-self-init"))
- mini_debug_options.llvm_disable_self_init = TRUE;
else if (!strcmp (option, "llvm-disable-inlining"))
mini_debug_options.llvm_disable_inlining = TRUE;
else if (!strcmp (option, "llvm-disable-implicit-null-checks"))