aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-01-17 01:03:14 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2004-01-17 00:03:14 +0000
commit3b75d796acf9c22722078351834c383093297e01 (patch)
treea45035f8d861fdcaa6b1f40eb57acaaa17897ce2 /gcc/c-common.c
parentd440f6424f307cd67843b27c9109211d1f51dcd1 (diff)
downloadgcc-3b75d796acf9c22722078351834c383093297e01.zip
gcc-3b75d796acf9c22722078351834c383093297e01.tar.gz
gcc-3b75d796acf9c22722078351834c383093297e01.tar.bz2
c-common.c (c_estimate_num_insns_1): Handle builtin_constant_p and builtin_expect specially.
* c-common.c (c_estimate_num_insns_1): Handle builtin_constant_p and builtin_expect specially. * params.def (PARAM_MAX_INLINE_INSNS_AUTO): Set to 100. (PARAM_LARGE_FUNCTION_INSNS): Set to 3000. * invoke.texi (max-inline-insns-single): Set to 100. (large-function-insns): Set to 3000. From-SVN: r76007
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index dcd540b..87ff053 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -5780,6 +5780,24 @@ c_estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
*count += ((size + MOVE_MAX_PIECES - 1) / MOVE_MAX_PIECES);
}
break;
+ case CALL_EXPR:
+ {
+ tree decl = get_callee_fndecl (x);
+
+ if (decl && DECL_BUILT_IN (decl))
+ switch (DECL_FUNCTION_CODE (decl))
+ {
+ case BUILT_IN_CONSTANT_P:
+ *walk_subtrees = 0;
+ return NULL_TREE;
+ case BUILT_IN_EXPECT:
+ return NULL_TREE;
+ default:
+ break;
+ }
+ *count += 10;
+ break;
+ }
/* Few special cases of expensive operations. This is usefull
to avoid inlining on functions having too many of these. */
case TRUNC_DIV_EXPR:
@@ -5791,7 +5809,6 @@ c_estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
case FLOOR_MOD_EXPR:
case ROUND_MOD_EXPR:
case RDIV_EXPR:
- case CALL_EXPR:
*count += 10;
break;
/* Various containers that will produce no code themselves. */