aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-11-10 03:35:19 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2010-11-10 02:35:19 +0000
commit9bb2f479f391114f46f6cb5d957b274ff0066135 (patch)
treec179f7d98e8b98e288509bbe8a5cf077dada2455 /gcc/ipa-inline.c
parentb8cbdff525821c2ca8aa8758ed48d50f101138db (diff)
downloadgcc-9bb2f479f391114f46f6cb5d957b274ff0066135.zip
gcc-9bb2f479f391114f46f6cb5d957b274ff0066135.tar.gz
gcc-9bb2f479f391114f46f6cb5d957b274ff0066135.tar.bz2
re PR tree-optimization/40436 (0.5% code size regression caused by r147852)
PR tree-optimization/40436 * ipa-inline.c (leaf_node_p): Implement using is_inexpensive_builtin. * tree-inline.c (estimate_num_insns): Inexpensive builtins are like normal instructions; be sure bultin is not implemented in this file; compute non-zero return cost. (init_inline_once): Reduce builtin_call_cost to 1; set return cost. * tree-inline.h (eni_weights_d): Add return cost. From-SVN: r166517
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 7241dcb..0072d61 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -1578,16 +1578,15 @@ cgraph_decide_inlining (void)
return 0;
}
-/* Return true when N is leaf function. Accept cheap (pure&const) builtins
+/* Return true when N is leaf function. Accept cheap builtins
in leaf functions. */
+
static bool
leaf_node_p (struct cgraph_node *n)
{
struct cgraph_edge *e;
for (e = n->callees; e; e = e->next_callee)
- if (!DECL_BUILT_IN (e->callee->decl)
- || (!TREE_READONLY (e->callee->decl)
- || DECL_PURE_P (e->callee->decl)))
+ if (!is_inexpensive_builtin (e->callee->decl))
return false;
return true;
}