mono_llvm_dump_value (LLVMValueRef value)
{
/* Same as LLVMDumpValue (), but print to stdout */
- fflush (stdout);
outs () << (*unwrap<Value> (value));
+ fflush (stdout);
+}
+
+void
+mono_llvm_dump_module (LLVMModuleRef module)
+{
+ /* Same as LLVMDumpModule (), but print to stdout */
+ outs () << (*unwrap (module));
+ fflush (stdout);
}
/* Missing overload for building an alloca with an alignment */
void
mono_llvm_dump_value (LLVMValueRef value);
+void
+mono_llvm_dump_module (LLVMModuleRef module);
+
LLVMValueRef
mono_llvm_build_alloca (LLVMBuilderRef builder, LLVMTypeRef Ty,
LLVMValueRef ArraySize,
if (cfg->verbose_level > 1) {
g_print ("\n*** Unoptimized LLVM IR for %s ***\n", mono_method_full_name (cfg->method, TRUE));
- mono_llvm_dump_value (method);
+ if (cfg->compile_aot) {
+ mono_llvm_dump_value (method);
+ } else {
+ mono_llvm_dump_module (ctx->lmodule);
+ }
g_print ("***\n\n");
}
cfg->native_code = (guint8*)mono_llvm_compile_method (ctx->module->mono_ee, ctx->lmethod, nvars, callee_vars, callee_addrs, &eh_frame);
if (cfg->verbose_level > 1) {
g_print ("\n*** Optimized LLVM IR for %s ***\n", mono_method_full_name (cfg->method, TRUE));
- mono_llvm_dump_value (ctx->lmethod);
+ if (cfg->compile_aot) {
+ mono_llvm_dump_value (ctx->lmethod);
+ } else {
+ mono_llvm_dump_module (ctx->lmodule);
+ }
g_print ("***\n\n");
}