g_print ("Compiling %d %s\n", count, desc);
g_free (desc);
}
- cfg = mini_method_compile (method, mono_get_optimizations_for_method (method, args->opts), mono_get_root_domain (), (JitFlags)0, 0, -1);
+ cfg = mini_method_compile (method, mono_get_optimizations_for_method (method, args->opts), mono_get_root_domain (), (JitFlags)JIT_FLAG_DISCARD_RESULTS, 0, -1);
if (cfg->exception_type != MONO_EXCEPTION_NONE) {
printf ("Compilation of %s failed with exception '%s':\n", mono_method_full_name (cfg->method, TRUE), cfg->exception_message);
fail_count ++;
g_free (id);
}
- if (!cfg->compile_aot) {
+ if (!cfg->compile_aot && !(flags & JIT_FLAG_DISCARD_RESULTS)) {
mono_domain_lock (cfg->domain);
mono_jit_info_table_add (cfg->domain, cfg->jit_info);
/* Whenever to compile in llvm-only mode */
JIT_FLAG_LLVM_ONLY = (1 << 6),
/* Whenever calls to pinvoke functions are made directly */
- JIT_FLAG_DIRECT_PINVOKE = (1 << 7)
+ JIT_FLAG_DIRECT_PINVOKE = (1 << 7),
+ /* Whenever this is a compile-all run and the result should be discarded */
+ JIT_FLAG_DISCARD_RESULTS = (1 << 8),
} JitFlags;
/* Bit-fields in the MonoBasicBlock.region */