\f
/* Perform allocation of pseudo-registers not allocated by local_alloc.
FILE is a file to output debugging information on,
- or zero if such output is not desired. */
+ or zero if such output is not desired.
-void
+ Return value is nonzero if reload failed
+ and we must not do any more for this function. */
+
+int
global_alloc (file)
FILE *file;
{
for the sake of debugging information. */
if (n_basic_blocks > 0)
#endif
- reload (get_insns (), 1, file);
+ return reload (get_insns (), 1, file);
}
/* Sort predicate for ordering the allocnos.
to be restored after we finish compiling the function
(for use when compiling inline calls to this function). */
tree saved_block_tree = 0;
+ int failure = 0;
/* If we are reconsidering an inline function
at the end of compilation, skip the stuff for making it inline. */
TIMEVAR (global_alloc_time,
{
if (!obey_regdecls)
- global_alloc (global_reg_dump ? global_reg_dump_file : 0);
+ failure = global_alloc (global_reg_dump ? global_reg_dump_file : 0);
else
- reload (insns, 0,
- global_reg_dump ? global_reg_dump_file : 0);
+ failure = reload (insns, 0,
+ global_reg_dump ? global_reg_dump_file : 0);
});
if (global_reg_dump)
fflush (global_reg_dump_file);
});
+ if (failure)
+ goto exit_rest_of_compilation;
+
reload_completed = 1;
if (optimize > 0 && flag_schedule_insns_after_reload)
#ifdef LEAF_REGISTERS
leaf_function = 0;
if (optimize > 0 && only_leaf_regs_used () && leaf_function_p ())
- leaf_function = 1;
+ leaf_function = 1;
#endif
/* One more attempt to remove jumps to .+1