[mono/mono] 3c4f1df5: [aot] Use temp.bc/temp.opt.bc instead of temp.s.bc/temp.s.opt.bc as llvm temporary file names.
"Zoltan Varga (
[email protected])" <
[email protected]>
Mon, 11 Nov 2013 07:24:57 +0000
| Newsgroups |
gmane.comp.gnome.mono.patches |
| Message-ID |
<00000142460c8e98-0e13e1f5-92aa-4886-abb5-8d4efbd23245-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/8b870df629e4...3c4f1df5a7ff
Commit: 3c4f1df5a7ffdd31d071a8db8f876f2b0ccf7dd1
Author: Zoltan Varga <[email protected]> (vargaz)
Date: 2013-11-11 07:23:33 GMT
URL: https://github.com/mono/mono/commit/3c4f1df5a7ffdd31d071a8db8f876f2b0ccf7dd1
[aot] Use temp.bc/temp.opt.bc instead of temp.s.bc/temp.s.opt.bc as llvm temporary file names.
Changed paths:
M mono/mini/aot-compiler.c
Modified: mono/mini/aot-compiler.c
===================================================================
@@ -209,6 +209,7 @@ struct _ReadOnlyValue {
MonoImageWriter *w;
MonoDwarfWriter *dwarf;
FILE *fp;
+ char *tmpbasename;
char *tmpfname;
GSList *cie_program;
GHashTable *unwind_info_offsets;
@@ -6915,7 +6916,7 @@ struct _ReadOnlyValue {
}
- tempbc = g_strdup_printf ("%s.bc", acfg->tmpfname);
+ tempbc = g_strdup_printf ("%s.bc", acfg->tmpbasename);
mono_llvm_emit_aot_module (tempbc, acfg->final_got_size);
g_free (tempbc);
@@ -6938,7 +6939,7 @@ struct _ReadOnlyValue {
//opts = g_strdup ("-simplifycfg -domtree -domfrontier -scalarrepl -instcombine -simplifycfg -domtree -domfrontier -scalarrepl -simplify-libcalls -instcombine -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -domfrontier -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -iv-users -indvars -loop-deletion -loop-simplify -lcssa -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -domtree -memdep -dse -adce -simplifycfg -preverify -domtree -verify");
opts = g_strdup ("-targetlibinfo -no-aa -basicaa -notti -instcombine -simplifycfg -sroa -domtree -early-cse -simplify-libcalls -lazy-value-info -correlated-propagation -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -indvars -loop-idiom -loop-deletion -loop-unroll -memdep -gvn -memdep -memcpyopt -sccp -instcombine -lazy-value-info -correlated-propagation -domtree -memdep -dse -adce -simplifycfg -instcombine -strip-dead-prototypes -preverify -domtree -verify");
#if 1
- command = g_strdup_printf ("%sopt -f %s -o \"%s.opt.bc\" \"%s.bc\"", acfg->aot_opts.llvm_path, opts, acfg->tmpfname, acfg->tmpfname);
+ command = g_strdup_printf ("%sopt -f %s -o \"%s.opt.bc\" \"%s.bc\"", acfg->aot_opts.llvm_path, opts, acfg->tmpbasename, acfg->tmpbasename);
printf ("Executing opt: %s\n", command);
if (system (command) != 0) {
exit (1);
@@ -6966,7 +6967,7 @@ struct _ReadOnlyValue {
#endif
unlink (acfg->tmpfname);
- command = g_strdup_printf ("%sllc %s -disable-gnu-eh-frame -enable-mono-eh-frame -o \"%s\" \"%s.opt.bc\"", acfg->aot_opts.llvm_path, acfg->llc_args->str, acfg->tmpfname, acfg->tmpfname);
+ command = g_strdup_printf ("%sllc %s -disable-gnu-eh-frame -enable-mono-eh-frame -o \"%s\" \"%s.opt.bc\"", acfg->aot_opts.llvm_path, acfg->llc_args->str, acfg->tmpfname, acfg->tmpbasename);
printf ("Executing llc: %s\n", command);
@@ -8781,12 +8782,16 @@ struct _ReadOnlyValue {
#ifdef ENABLE_LLVM
if (acfg->llvm) {
if (acfg->aot_opts.asm_only) {
- if (acfg->aot_opts.outfile)
+ if (acfg->aot_opts.outfile) {
acfg->tmpfname = g_strdup_printf ("%s", acfg->aot_opts.outfile);
- else
- acfg->tmpfname = g_strdup_printf ("%s.s", acfg->image->name);
+ acfg->tmpbasename = g_strdup (acfg->tmpfname);
+ } else {
+ acfg->tmpbasename = g_strdup_printf ("%s", acfg->image->name);
+ acfg->tmpfname = g_strdup_printf ("%s.s", acfg->tmpbasename);
+ }
} else {
- acfg->tmpfname = g_strdup ("temp.s");
+ acfg->tmpbasename = g_strdup_printf ("%s", "temp");
+ acfg->tmpfname = g_strdup_printf ("%s.s", acfg->tmpbasename);
}
emit_llvm_file (acfg);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches