[patch] Simplify folding of a CALL_EXPR in fold_ternary
Volker Reichelt
reichelt@igpm.rwth-aachen.de
Tue Aug 16 15:12:00 GMT 2005
The following patch simplifies the folding of a CALL_EXPR in fold_ternary
in fold-const.c by removing a superfluous if-statement and a couple of
temporaries.
Bootstrapped and regtested on i686-pc-linux-gnu.
Ok for mainline?
Regards,
Volker
2005-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* fold-const.c (fold_ternary): Simplify folding of a CALL_EXPR.
===================================================================
--- gcc/gcc/fold-const.c 14 Aug 2005 23:19:05 -0000 1.616
+++ gcc/gcc/fold-const.c 16 Aug 2005 00:12:24 -0000
@@ -10106,13 +10106,7 @@ fold_ternary (enum tree_code code, tree
if (TREE_CODE (op0) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (op0, 0)) == FUNCTION_DECL
&& DECL_BUILT_IN (TREE_OPERAND (op0, 0)))
- {
- tree fndecl = TREE_OPERAND (op0, 0);
- tree arglist = op1;
- tree tmp = fold_builtin (fndecl, arglist, false);
- if (tmp)
- return tmp;
- }
+ return fold_builtin (TREE_OPERAND (op0, 0), op1, false);
return NULL_TREE;
case BIT_FIELD_REF:
===================================================================
More information about the Gcc-patches
mailing list