builtins.c (expand_builtin_strcat): Remove superfluous call to fold.
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Tue, 16 Aug 2005 12:14:10 +0000 (12:14 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Tue, 16 Aug 2005 12:14:10 +0000 (12:14 +0000)
* builtins.c (expand_builtin_strcat): Remove superfluous call to fold.
(fold_builtin_isdigit): Use fold_buildN.
(build_function_call_expr): Likewise.
* c-typeck.c (c_finish_loop): Likewise.

From-SVN: r103154

gcc/ChangeLog
gcc/builtins.c
gcc/c-typeck.c

index 9d613e4c676e9a45bd8b10ec732be5e1b20b3d6b..9614c472f9f5c7123ae3f7d39d820fa6066fd10f 100644 (file)
@@ -1,3 +1,10 @@
+2005-08-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       * builtins.c (expand_builtin_strcat): Remove superfluous call to fold.
+       (fold_builtin_isdigit): Use fold_buildN.
+       (build_function_call_expr): Likewise.
+       * c-typeck.c (c_finish_loop): Likewise.
+
 2005-08-16  J"orn Rennecke <joern.rennecke@st.com>
             Richard Shann <rshann@superh.com>
 
index bd187c18356b7b0a97c9d6907e7213eca7794d30..13d80ed53dcffaec635027ab2cd8820a371b7261 100644 (file)
@@ -3860,9 +3860,8 @@ expand_builtin_strcat (tree arglist, tree type, rtx target, enum machine_mode mo
 
              /* Create strlen (dst).  */
              newdst =
-               fold (build_function_call_expr (strlen_fn,
-                                               build_tree_list (NULL_TREE,
-                                                                dst)));
+               build_function_call_expr (strlen_fn,
+                                         build_tree_list (NULL_TREE, dst));
              /* Create (dst + (cast) strlen (dst)).  */
              newdst = fold_convert (TREE_TYPE (dst), newdst);
              newdst = fold_build2 (PLUS_EXPR, TREE_TYPE (dst), dst, newdst);
@@ -8291,9 +8290,8 @@ fold_builtin_isdigit (tree arglist)
       arg = fold_convert (unsigned_type_node, TREE_VALUE (arglist));
       arg = build2 (MINUS_EXPR, unsigned_type_node, arg,
                    build_int_cst (unsigned_type_node, target_digit0));
-      arg = build2 (LE_EXPR, integer_type_node, arg,
-                   build_int_cst (unsigned_type_node, 9));
-      arg = fold (arg);
+      arg = fold_build2 (LE_EXPR, integer_type_node, arg,
+                        build_int_cst (unsigned_type_node, 9));
       if (in_gimple_form && !TREE_CONSTANT (arg))
         return NULL_TREE;
       else
@@ -8929,9 +8927,8 @@ build_function_call_expr (tree fn, tree arglist)
   tree call_expr;
 
   call_expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn);
-  call_expr = build3 (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
+  return fold_build3 (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
                      call_expr, arglist, NULL_TREE);
-  return fold (call_expr);
 }
 
 /* This function validates the types of a function call argument list
index 29d90675a713e19bc47890f57d4527229315c873..39f682229a53f54ef6a77935dd00dce34bbcfafa 100644 (file)
@@ -7086,8 +7086,7 @@ c_finish_loop (location_t start_locus, tree cond, tree incr, tree body,
             }
  
          t = build_and_jump (&blab);
-          exit = build3 (COND_EXPR, void_type_node, cond, exit, t);
-          exit = fold (exit);
+          exit = fold_build3 (COND_EXPR, void_type_node, cond, exit, t);
          if (cond_is_first)
             SET_EXPR_LOCATION (exit, start_locus);
          else