|
|
|
@ -2210,45 +2210,48 @@ bool dmrC_omrcompile(int argc, char **argv, JIT_ContextRef module, const char *i
|
|
|
|
|
C->codegen = 1; /* Disables macros related to vararg processing */
|
|
|
|
|
C->Wdecl = 0;
|
|
|
|
|
|
|
|
|
|
symlist = dmrC_sparse_initialize(C, argc, argv, &filelist);
|
|
|
|
|
|
|
|
|
|
int rc = 0;
|
|
|
|
|
if (compile(C, module, symlist)) {
|
|
|
|
|
/* We need ->phi_users */
|
|
|
|
|
/* This flag enables call to dmrC_track_pseudo_death() in
|
|
|
|
|
linearize.c which sets
|
|
|
|
|
phi_users list on PHISOURCE instructions */
|
|
|
|
|
C->dbg_dead = 1;
|
|
|
|
|
FOR_EACH_PTR(filelist, file)
|
|
|
|
|
{
|
|
|
|
|
symlist = dmrC_sparse(C, file);
|
|
|
|
|
if (C->die_if_error) {
|
|
|
|
|
rc = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!compile(C, module, symlist)) {
|
|
|
|
|
rc = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
END_FOR_EACH_PTR(file);
|
|
|
|
|
if (inputbuffer && rc == 0) {
|
|
|
|
|
char *buffer = strdup(inputbuffer);
|
|
|
|
|
if (!buffer)
|
|
|
|
|
rc = 1;
|
|
|
|
|
else {
|
|
|
|
|
symlist = dmrC_sparse_buffer(C, "buffer", buffer, 0);
|
|
|
|
|
free(buffer);
|
|
|
|
|
if (C->die_if_error) {
|
|
|
|
|
if (!setjmp(C->jmpbuf)) {
|
|
|
|
|
symlist = dmrC_sparse_initialize(C, argc, argv, &filelist);
|
|
|
|
|
if (compile(C, module, symlist)) {
|
|
|
|
|
/* We need ->phi_users */
|
|
|
|
|
/* This flag enables call to dmrC_track_pseudo_death() in
|
|
|
|
|
linearize.c which sets
|
|
|
|
|
phi_users list on PHISOURCE instructions */
|
|
|
|
|
C->dbg_dead = 1;
|
|
|
|
|
FOR_EACH_PTR(filelist, file)
|
|
|
|
|
{
|
|
|
|
|
symlist = dmrC_sparse(C, file);
|
|
|
|
|
if (C->die_if_error || !symlist) {
|
|
|
|
|
rc = 1;
|
|
|
|
|
} else if (!compile(C, module, symlist)) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!compile(C, module, symlist)) {
|
|
|
|
|
rc = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
END_FOR_EACH_PTR(file);
|
|
|
|
|
if (inputbuffer && rc == 0) {
|
|
|
|
|
char *buffer = strdup(inputbuffer);
|
|
|
|
|
if (!buffer)
|
|
|
|
|
rc = 1;
|
|
|
|
|
else {
|
|
|
|
|
symlist = dmrC_sparse_buffer(C, "buffer", buffer, 0);
|
|
|
|
|
free(buffer);
|
|
|
|
|
if (C->die_if_error || !symlist) {
|
|
|
|
|
rc = 1;
|
|
|
|
|
} else if (!compile(C, module, symlist)) {
|
|
|
|
|
rc = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
rc = 1;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
rc = 1;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (rc == 1) {
|
|
|
|
|
fprintf(stderr, "Failed to compile given inputs\n");
|
|
|
|
|
}
|
|
|
|
|