* flow.c (find_basic_blocks): Don't create a new basic block
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 27 Dec 1997 23:34:14 +0000 (23:34 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 27 Dec 1997 23:34:14 +0000 (23:34 +0000)
        for calls in a LIBCALL block.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17247 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/flow.c

index 898cc85..05ecb58 100644 (file)
@@ -1,3 +1,8 @@
+Sun Dec 28 00:32:16 1997  Jeffrey A Law  (law@cygnus.com)
+
+       * flow.c (find_basic_blocks): Don't create a new basic block
+       for calls in a LIBCALL block.
+
 Sun Dec 28 00:30:24 1997  David Edelsohn  <edelsohn@mhpcc.edu>
 
        * config/fp-bit.c (L_df_to_sf): Fix typo in last change.
index 69c7d6b..55516b4 100644 (file)
@@ -284,6 +284,7 @@ flow_analysis (f, nregs, file)
   register rtx insn;
   register int i;
   rtx nonlocal_label_list = nonlocal_label_rtx_list ();
+  int in_libcall_block = 0;
 
 #ifdef ELIMINABLE_REGS
   static struct {int from, to; } eliminables[] = ELIMINABLE_REGS;
@@ -312,6 +313,12 @@ flow_analysis (f, nregs, file)
 
     for (insn = f, i = 0; insn; insn = NEXT_INSN (insn))
       {
+
+       /* Track when we are inside in LIBCALL block.  */
+       if (GET_RTX_CLASS (GET_CODE (insn)) == 'i'
+           && find_reg_note (insn, REG_LIBCALL, NULL_RTX))
+         in_libcall_block = 1;
+
        code = GET_CODE (insn);
        if (INSN_UID (insn) > max_uid_for_flow)
          max_uid_for_flow = INSN_UID (insn);
@@ -320,7 +327,7 @@ flow_analysis (f, nregs, file)
                && (prev_code == JUMP_INSN
                    || (prev_code == CALL_INSN
                        && (nonlocal_label_list != 0 || eh_region)
-                       && ! find_reg_note (insn, REG_RETVAL, NULL_RTX))
+                       && ! in_libcall_block)
                    || prev_code == BARRIER)))
          i++;
 
@@ -333,6 +340,10 @@ flow_analysis (f, nregs, file)
          ++eh_region;
        else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)
          --eh_region;
+
+       if (GET_RTX_CLASS (GET_CODE (insn)) == 'i'
+           && find_reg_note (insn, REG_RETVAL, NULL_RTX))
+         in_libcall_block = 0;
       }
   }
 
@@ -389,6 +400,7 @@ find_basic_blocks (f, nonlocal_label_list)
   rtx x, note, eh_note;
   enum rtx_code prev_code, code;
   int depth, pass;
+  int in_libcall_block = 0;
 
   pass = 1;
   active_eh_handler = (rtx *) alloca ((max_uid_for_flow + 1) * sizeof (rtx));
@@ -412,6 +424,12 @@ find_basic_blocks (f, nonlocal_label_list)
   for (eh_note = NULL_RTX, insn = f, i = -1, prev_code = JUMP_INSN, depth = 1;
        insn; insn = NEXT_INSN (insn))
     {
+
+      /* Track when we are inside in LIBCALL block.  */
+      if (GET_RTX_CLASS (GET_CODE (insn)) == 'i'
+         && find_reg_note (insn, REG_LIBCALL, NULL_RTX))
+       in_libcall_block = 1;
+
       code = GET_CODE (insn);
       if (code == NOTE)
        {
@@ -427,7 +445,7 @@ find_basic_blocks (f, nonlocal_label_list)
                   && (prev_code == JUMP_INSN
                       || (prev_code == CALL_INSN
                           && (nonlocal_label_list != 0 || eh_note)
-                          && ! find_reg_note (insn, REG_RETVAL, NULL_RTX))
+                          && ! in_libcall_block)
                       || prev_code == BARRIER)))
        {
          basic_block_head[++i] = insn;
@@ -485,13 +503,17 @@ find_basic_blocks (f, nonlocal_label_list)
       else if (eh_note
               && (asynchronous_exceptions
                   || (GET_CODE (insn) == CALL_INSN
-                      && ! find_reg_note (insn, REG_RETVAL, NULL_RTX))))
+                      && ! in_libcall_block)))
        active_eh_handler[INSN_UID (insn)] = XEXP (eh_note, 0);
 
       BLOCK_NUM (insn) = i;
 
       if (code != NOTE)
        prev_code = code;
+
+      if (GET_RTX_CLASS (GET_CODE (insn)) == 'i'
+         && find_reg_note (insn, REG_RETVAL, NULL_RTX))
+       in_libcall_block = 0;
     }
 
   /* During the second pass, `n_basic_blocks' is only an upper bound.