OSDN Git Service

*** empty log message ***
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Jun 1992 02:02:28 +0000 (02:02 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Jun 1992 02:02:28 +0000 (02:02 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1231 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/global.c
gcc/toplev.c

index 3f9b081..527d67f 100644 (file)
@@ -262,9 +262,12 @@ static void set_preference ();
 \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;
 {
@@ -543,7 +546,7 @@ global_alloc (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.
index a814984..a4da795 100644 (file)
@@ -1977,6 +1977,7 @@ rest_of_compilation (decl)
      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.  */
@@ -2343,10 +2344,10 @@ rest_of_compilation (decl)
   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)
@@ -2357,6 +2358,9 @@ rest_of_compilation (decl)
               fflush (global_reg_dump_file);
             });
 
+  if (failure)
+    goto exit_rest_of_compilation;
+
   reload_completed = 1;
 
   if (optimize > 0 && flag_schedule_insns_after_reload)
@@ -2386,7 +2390,7 @@ rest_of_compilation (decl)
 #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