OSDN Git Service

2005-08-04 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Aug 2005 18:55:15 +0000 (18:55 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Aug 2005 18:55:15 +0000 (18:55 +0000)
        * tree.h (fold_build1): Change to macro and call fold_build1_stat.
        (fold_build2): Likewise.
        (fold_build3): Likewise.
        (fold_build1_stat): New function prototype.
        (fold_build2_stat): Likewise.
        (fold_build3_stat): Likewise.
        * fold-const.c (fold_build1): Rename to ..
        (fold_build1_stat): this.  Add MEM_STAT_DECL.  Pass the mem stats
        through to build1_stat.
        (fold_build2): Rename to ..
        (fold_build2_stat): this.  Add MEM_STAT_DECL.  Pass the mem stats
        through to build2_stat.
        (fold_build3): Rename to ..
        (fold_build3_stat): this.  Add MEM_STAT_DECL.  Pass the mem stats
        through to build3_stat.

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

gcc/ChangeLog
gcc/fold-const.c
gcc/tree.h

index 8472494..151a1dc 100644 (file)
@@ -1,3 +1,21 @@
+2005-08-04  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * tree.h (fold_build1): Change to macro and call fold_build1_stat.
+       (fold_build2): Likewise.
+       (fold_build3): Likewise.
+       (fold_build1_stat): New function prototype.
+       (fold_build2_stat): Likewise.
+       (fold_build3_stat): Likewise.
+       * fold-const.c (fold_build1): Rename to ..
+       (fold_build1_stat): this.  Add MEM_STAT_DECL.  Pass the mem stats
+       through to build1_stat.
+       (fold_build2): Rename to ..
+       (fold_build2_stat): this.  Add MEM_STAT_DECL.  Pass the mem stats
+       through to build2_stat.
+       (fold_build3): Rename to ..
+       (fold_build3_stat): this.  Add MEM_STAT_DECL.  Pass the mem stats
+       through to build3_stat.
+
 2005-08-04  David Edelsohn  <edelsohn@gnu.org>
 
        * function.c (assign_stack_local_1): Do not correct stack slot
index ed5394a..383bd67 100644 (file)
@@ -10414,7 +10414,7 @@ recursive_label:
    operand OP0.  */
 
 tree
-fold_build1 (enum tree_code code, tree type, tree op0)
+fold_build1_stat (enum tree_code code, tree type, tree op0 MEM_STAT_DECL)
 {
   tree tem;
 #ifdef ENABLE_FOLD_CHECKING
@@ -10431,7 +10431,7 @@ fold_build1 (enum tree_code code, tree type, tree op0)
   
   tem = fold_unary (code, type, op0);
   if (!tem)
-    tem = build1 (code, type, op0);
+    tem = build1_stat (code, type, op0 PASS_MEM_STAT);
   
 #ifdef ENABLE_FOLD_CHECKING
   md5_init_ctx (&ctx);
@@ -10451,7 +10451,8 @@ fold_build1 (enum tree_code code, tree type, tree op0)
    with operands OP0 and OP1.  */
 
 tree
-fold_build2 (enum tree_code code, tree type, tree op0, tree op1)
+fold_build2_stat (enum tree_code code, tree type, tree op0, tree op1
+                 MEM_STAT_DECL)
 {
   tree tem;
 #ifdef ENABLE_FOLD_CHECKING
@@ -10476,7 +10477,7 @@ fold_build2 (enum tree_code code, tree type, tree op0, tree op1)
 
   tem = fold_binary (code, type, op0, op1);
   if (!tem)
-    tem = build2 (code, type, op0, op1);
+    tem = build2_stat (code, type, op0, op1 PASS_MEM_STAT);
   
 #ifdef ENABLE_FOLD_CHECKING
   md5_init_ctx (&ctx);
@@ -10504,8 +10505,10 @@ fold_build2 (enum tree_code code, tree type, tree op0, tree op1)
    type TYPE with operands OP0, OP1, and OP2.  */
 
 tree
-fold_build3 (enum tree_code code, tree type, tree op0, tree op1, tree op2)
-{  tree tem;
+fold_build3_stat (enum tree_code code, tree type, tree op0, tree op1, tree op2
+            MEM_STAT_DECL)
+{
+  tree tem;
 #ifdef ENABLE_FOLD_CHECKING
   unsigned char checksum_before_op0[16],
                 checksum_before_op1[16],
@@ -10535,7 +10538,7 @@ fold_build3 (enum tree_code code, tree type, tree op0, tree op1, tree op2)
   
   tem = fold_ternary (code, type, op0, op1, op2);
   if (!tem)
-    tem =  build3 (code, type, op0, op1, op2);
+    tem =  build3_stat (code, type, op0, op1, op2 PASS_MEM_STAT);
       
 #ifdef ENABLE_FOLD_CHECKING
   md5_init_ctx (&ctx);
index b6b637a..7ddfa97 100644 (file)
@@ -3789,9 +3789,12 @@ extern tree fold (tree);
 extern tree fold_unary (enum tree_code, tree, tree);
 extern tree fold_binary (enum tree_code, tree, tree, tree);
 extern tree fold_ternary (enum tree_code, tree, tree, tree, tree);
-extern tree fold_build1 (enum tree_code, tree, tree);
-extern tree fold_build2 (enum tree_code, tree, tree, tree);
-extern tree fold_build3 (enum tree_code, tree, tree, tree, tree);
+extern tree fold_build1_stat (enum tree_code, tree, tree MEM_STAT_DECL);
+#define fold_build1(c,t1,t2) fold_build1_stat (c, t1, t2 MEM_STAT_INFO)
+extern tree fold_build2_stat (enum tree_code, tree, tree, tree MEM_STAT_DECL);
+#define fold_build2(c,t1,t2,t3) fold_build2_stat (c, t1, t2, t3 MEM_STAT_INFO)
+extern tree fold_build3_stat (enum tree_code, tree, tree, tree, tree MEM_STAT_DECL);
+#define fold_build3(c,t1,t2,t3,t4) fold_build3_stat (c, t1, t2, t3, t4 MEM_STAT_INFO)
 extern tree fold_initializer (tree);
 extern tree fold_convert (tree, tree);
 extern tree fold_single_bit_test (enum tree_code, tree, tree, tree);