OSDN Git Service

Merge basic-improvements-branch to trunk
[pf3gnuchains/gcc-fork.git] / gcc / cp / optimize.c
index 6fbcc2b..6de190d 100644 (file)
@@ -21,6 +21,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #include "config.h"
 #include "system.h"
+#include "coretypes.h"
+#include "tm.h"
 #include "tree.h"
 #include "cp-tree.h"
 #include "rtl.h"
@@ -37,15 +39,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 /* Prototypes.  */
 
-static tree calls_setjmp_r PARAMS ((tree *, int *, void *));
-static void update_cloned_parm PARAMS ((tree, tree));
-static void dump_function PARAMS ((enum tree_dump_index, tree));
+static tree calls_setjmp_r (tree *, int *, void *);
+static void update_cloned_parm (tree, tree);
+static void dump_function (enum tree_dump_index, tree);
 
 /* Optimize the body of FN.  */
 
 void
-optimize_function (fn)
-     tree fn;
+optimize_function (tree fn)
 {
   dump_function (TDI_original, fn);
 
@@ -81,10 +82,8 @@ optimize_function (fn)
 /* Called from calls_setjmp_p via walk_tree.  */
 
 static tree
-calls_setjmp_r (tp, walk_subtrees, data)
-     tree *tp;
-     int *walk_subtrees ATTRIBUTE_UNUSED;
-     void *data ATTRIBUTE_UNUSED;
+calls_setjmp_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
+                void *data ATTRIBUTE_UNUSED)
 {
   /* We're only interested in FUNCTION_DECLS.  */
   if (TREE_CODE (*tp) != FUNCTION_DECL)
@@ -98,9 +97,8 @@ calls_setjmp_r (tp, walk_subtrees, data)
    occasionally return a nonzero value even when FN does not actually
    call `setjmp'.  */
 
-int
-calls_setjmp_p (fn)
-     tree fn;
+bool
+calls_setjmp_p (tree fn)
 {
   return walk_tree_without_duplicates (&DECL_SAVED_TREE (fn),
                                       calls_setjmp_r,
@@ -113,9 +111,7 @@ calls_setjmp_p (fn)
    debugging generation code will be able to find the original PARM.  */
 
 static void
-update_cloned_parm (parm, cloned_parm)
-     tree parm;
-     tree cloned_parm;
+update_cloned_parm (tree parm, tree cloned_parm)
 {
   DECL_ABSTRACT_ORIGIN (cloned_parm) = parm;
 
@@ -136,12 +132,11 @@ update_cloned_parm (parm, cloned_parm)
    necessary.  Returns nonzero if there's no longer any need to
    process the main body.  */
 
-int
-maybe_clone_body (fn)
-     tree fn;
+bool
+maybe_clone_body (tree fn)
 {
   tree clone;
-  int first = 1;
+  bool first = true;
 
   /* We only clone constructors and destructors.  */
   if (!DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (fn)
@@ -155,7 +150,7 @@ maybe_clone_body (fn)
      list.  */
   for (clone = TREE_CHAIN (fn);
        clone && DECL_CLONED_FUNCTION_P (clone);
-       clone = TREE_CHAIN (clone), first = 0)
+       clone = TREE_CHAIN (clone), first = false)
     {
       tree parm;
       tree clone_parm;
@@ -278,9 +273,7 @@ maybe_clone_body (fn)
 /* Dump FUNCTION_DECL FN as tree dump PHASE.  */
 
 static void
-dump_function (phase, fn)
-     enum tree_dump_index phase;
-     tree fn;
+dump_function (enum tree_dump_index phase, tree fn)
 {
   FILE *stream;
   int flags;