]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.in (optabs.o): Add dependencies on basic-block.h and hard-reg-set.h.
authorJosef Zlomek <zlomj9am@artax.karlin.mff.cuni.cz>
Fri, 10 Jan 2003 13:36:19 +0000 (14:36 +0100)
committerJosef Zlomek <zlomek@gcc.gnu.org>
Fri, 10 Jan 2003 13:36:19 +0000 (13:36 +0000)
* Makefile.in (optabs.o): Add dependencies on basic-block.h and
hard-reg-set.h.
* basic-block.h (control_flow_insn_p): Fuction was exported.
* cfgbuild.c (control_flow_insn_p): Fuction was made non-static.
* optabs.c (emit_libcall_block): Emit REG_LIBCALL and REG_RETVAL
notes only when the region is contained in a single basic block.

From-SVN: r61149

gcc/ChangeLog
gcc/Makefile.in
gcc/basic-block.h
gcc/cfgbuild.c
gcc/optabs.c

index 9a864f55bade3abc49424054185e94dcb78c1a16..588016ddb7c11f8837276e67f12edea85b8e900c 100644 (file)
@@ -1,3 +1,12 @@
+2003-01-10  Josef Zlomek <zlomj9am@artax.karlin.mff.cuni.cz>
+
+       * Makefile.in (optabs.o): Add dependencies on basic-block.h and
+       hard-reg-set.h.
+       * basic-block.h (control_flow_insn_p): Fuction was exported.
+       * cfgbuild.c (control_flow_insn_p): Fuction was made non-static.
+       * optabs.c (emit_libcall_block): Emit REG_LIBCALL and REG_RETVAL
+       notes only when the region is contained in a single basic block.
+
 2003-01-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR inline-asm/8832
index 366919bb962a1aa1192061ec81643494aca1f14a..a12a7407d36c1fc84c1f665341ced060ec034440 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile for GNU C compiler.
 #   Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
-#   1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+#   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -1410,7 +1410,7 @@ explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
    toplev.h function.h ggc.h $(TM_P_H)
 optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h  \
    insn-config.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(RECOG_H) reload.h \
-   toplev.h $(GGC_H) real.h $(TM_P_H) except.h
+   toplev.h $(GGC_H) real.h $(TM_P_H) except.h hard-reg-set.h $(BASIC_BLOCK_H)
 dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
     $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) function.h langhooks.h \
    insn-config.h reload.h gstab.h xcoffout.h output.h dbxout.h toplev.h
index f5bbd261f6b58906855c622e429d808f1fe534f2..aa78b451a3b16cbe6aa66cceb325350bd095a3a0 100644 (file)
@@ -1,5 +1,5 @@
 /* Define control and data flow tables, and regsets.
-   Copyright (C) 1987, 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright (C) 1987, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -692,6 +692,7 @@ extern conflict_graph conflict_graph_compute
 extern bool mark_dfs_back_edges                PARAMS ((void));
 extern void update_br_prob_note                PARAMS ((basic_block));
 extern void fixup_abnormal_edges       PARAMS ((void));
+extern bool control_flow_insn_p                PARAMS ((rtx));
 
 /* In dominance.c */
 
index 136ec07dda75740f6d79be31c26d671f7cedfa4f..3a5af2dd2b29d9d12e8b0c5f9917c90b334cb2fb 100644 (file)
@@ -1,6 +1,6 @@
 /* Control flow graph building code for GNU compiler.
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -57,7 +57,6 @@ static void make_eh_edge              PARAMS ((sbitmap *, basic_block, rtx));
 static void find_bb_boundaries         PARAMS ((basic_block));
 static void compute_outgoing_frequencies PARAMS ((basic_block));
 static bool inside_basic_block_p       PARAMS ((rtx));
-static bool control_flow_insn_p                PARAMS ((rtx));
 \f
 /* Return true if insn is something that should be contained inside basic
    block.  */
@@ -95,7 +94,7 @@ inside_basic_block_p (insn)
 /* Return true if INSN may cause control flow transfer, so it should be last in
    the basic block.  */
 
-static bool
+bool
 control_flow_insn_p (insn)
      rtx insn;
 {
index 19a7a951fb5a24d43ccae2f5ddee6f71bd3a668c..7e14ceb939b5c0981be5b822e65222059cca7da8 100644 (file)
@@ -1,6 +1,6 @@
 /* Expand the basic unary and binary arithmetic operations, for GNU compiler.
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -40,6 +40,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "reload.h"
 #include "ggc.h"
 #include "real.h"
+#include "hard-reg-set.h"
+#include "basic-block.h"
 
 /* Each optab contains info on how this target machine
    can perform a particular operation
@@ -2978,10 +2980,26 @@ emit_libcall_block (insns, target, result, equiv)
   /* Encapsulate the block so it gets manipulated as a unit.  */
   if (!flag_non_call_exceptions || !may_trap_p (equiv))
     {
-      REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last,
-                                            REG_NOTES (first));
-      REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first,
-                                           REG_NOTES (last));
+      /* We can't attach the REG_LIBCALL and REG_RETVAL notes
+        when the encapsulated region would not be in one basic block,
+        i.e. when there is a control_flow_insn_p insn between FIRST and LAST.
+       */
+      bool attach_libcall_retval_notes = true;
+      next = NEXT_INSN (last);
+      for (insn = first; insn != next; insn = NEXT_INSN (insn))
+       if (control_flow_insn_p (insn))
+         {
+           attach_libcall_retval_notes = false;
+           break;
+         }
+
+      if (attach_libcall_retval_notes)
+       {
+         REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last,
+                                                REG_NOTES (first));
+         REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first,
+                                               REG_NOTES (last));
+       }
     }
 }
 \f